As I know, go profile use SIGPROF to sample call stacks N times per second in cpu time.
It will ignore idle time, waiting time since these time doesn’t consume cpu.
To profile a go program with mix load, I want to profile it base on wall time: samples
call stacks N times per second in wall time. And it will show the result in same UI of cpu time.
For example, poor man’s profiler (https://poormansprofiler.org/) sampling program by running gdb per second(or minute).
How to do it with current go prof? or some others tools?
I leave it as an exercise for you to make the function safe to call from multiple go routines, sort the output on some useful variable and also write a program which adds the defer line in every function body in your project