Command
go tool pprof cpu.profExplanation
Profile Go programs to analyze performance bottlenecks and memory usage.
Examples
Analyze CPU profile
go tool pprof cpu.profAnalyze memory profile
go tool pprof mem.profGenerate CPU profile
go test -cpuprofile=cpu.prof