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

This commit is contained in:
mergify[bot]
2023-06-21 16:40:48 +00:00
committed by GitHub
parent 179c6c7451
commit e991124b07
+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.