You've already forked go-profiler-notes
mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2025-07-15 23:54:16 +02:00
Write to file
This commit is contained in:
@ -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.
Reference in New Issue
Block a user