[–] cube2222 3y ago ↗ Go profiling tools are absolutely excellent!One more tool, which the OP surprisingly doesn't mention, is `go tool trace` for execution tracing. It's really useful, esp. when debugging GC behavior or CGO calls locking up threads.
[–] everybodyknows 3y ago ↗ Needlessly complicated for most CLI applications. A better starting point:https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program
[–] platzhirsch 3y ago ↗ On this topic I highly recommend Bill Kennedy's talk: https://youtu.be/6qAfkJGWsnsIt helped me to step upy profiling game quite a bit.
3 comments
[ 3.2 ms ] story [ 15.9 ms ] threadOne more tool, which the OP surprisingly doesn't mention, is `go tool trace` for execution tracing. It's really useful, esp. when debugging GC behavior or CGO calls locking up threads.
https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program
It helped me to step upy profiling game quite a bit.