refactor: cleanup profiling code with equivalent one (#16634)

This commit is contained in:
yihuang
2023-06-21 11:44:02 +00:00
committed by GitHub
parent a827f42ae3
commit c63d5fa75e
+1 -6
View File
@@ -549,12 +549,7 @@ func wrapCPUProfile(svrCtx *Context, callbackFn func() error) error {
}()
}
errCh := make(chan error)
go func() {
errCh <- callbackFn()
}()
return <-errCh
return callbackFn()
}
// emitServerInfoMetrics emits server info related metrics using application telemetry.