At the start of the program I do:
if *profiler != "" { fprof, err := os.Create(*profiler) if err != nil { log.Fatal("Can't open profiler file:", err) return } pprof.StartCPUProfile(fprof) defer pprof.StopCPUProfile() } The program works 2 minutes, then it ends regularly. CPU load 30-40%. Profile file weighs 695K. When I try to see who is eating the processor, I get:
go tool pprof -text sm-1.prof 22.63s of 22.63s total ( 100%) flat flat% sum% cum cum% 22.63s 100% 100% 22.63s 100% those. no detail.
Go 1.5.1, OS Linux x86_64