From 1c7fba64bebfa52c3e5ebea64f75eee87b1de5a9 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 4 Apr 2024 11:20:40 +0800 Subject: [PATCH] fix: close cpu profile Signed-off-by: guoguangwu --- examples/remote-benchmark/node1/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/remote-benchmark/node1/main.go b/examples/remote-benchmark/node1/main.go index 9c1cccc34..336e1e12e 100644 --- a/examples/remote-benchmark/node1/main.go +++ b/examples/remote-benchmark/node1/main.go @@ -56,6 +56,7 @@ func main() { if err != nil { log.Fatal(err) } + defer f.Close() pprof.StartCPUProfile(f) defer pprof.StopCPUProfile() }