mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-21 00:46:51 +08:00
14 lines
180 B
Go
14 lines
180 B
Go
//go:build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
"runtime/pprof"
|
|
)
|
|
|
|
func main() {
|
|
file, _ := os.Create("./cpu.pprof")
|
|
pprof.StartCPUProfile(file)
|
|
defer pprof.StopCPUProfile()
|
|
}
|