(pprof) top 5 -cum
0.09s of 32s total ( 0.28%)
Dropped 449 nodes (cum <= 0.16s)
Showing top 5 nodes out of 249 (cum >= 7.49s)
flat flat% sum% cum cum%
0 0% 0% 22.17s 69.28% runtime.goexit
0.01s 0.031% 0.031% 8.73s 27.28% net/http.(*conn).serve
0 0% 0.031% 7.77s 24.28% runtime.mcall
0.07s 0.22% 0.25% 7.62s 23.81% runtime.schedule
0.01s 0.031% 0.28% 7.49s 23.41% net/http.serverHandler.ServeHTTP
block,goroutine,heap,threadcreate
And when I try to curl to http://my-app/debug/pprof/trace?seconds=30" for my application, I get the error that no such profile.
How do I enable execution tracer profile for my app?
Thanks!
Ajayruntime.trace.Start (io.Writer)time.Sleep(N seconds)runtime.trace.Stop()
go tool trace /path/to/your/app/executable <binary-trace-file-collected-above>