mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-21 17:06:53 +08:00
Write to file
This commit is contained in:
parent
046954caa7
commit
d315e34e2e
2 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
pprof.StartCPUProfile(os.Stdout)
|
file, _ := os.Create("./cpu-utilization.pprof")
|
||||||
|
pprof.StartCPUProfile(file)
|
||||||
defer pprof.StopCPUProfile()
|
defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
go cpuHog()
|
go cpuHog()
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in a new issue