fix(benchmark): close CPU profile file handle after profiling (#10048)

Co-authored-by: Contributor <contributor@example.com>
This commit is contained in:
AlexALei
2026-06-22 20:33:22 -07:00
committed by GitHub
co-authored by Contributor
parent 11b7b7247f
commit 091d953c34
+4 -1
View File
@@ -131,7 +131,10 @@ func runBenchmark(cmd *Command, args []string) bool {
glog.Fatal(err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
defer func() {
pprof.StopCPUProfile()
f.Close()
}()
}
// Determine what operations to perform