4 ms·
Profiling Go Programs (CLI Edition)
- cube2222 4y agoGo 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 4y agoNeedlessly complicated for most CLI applications. A better starting point: https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program
- platzhirsch 4y agoOn this topic I highly recommend Bill Kennedy's talk: https://youtu.be/6qAfkJGWsns https://youtu.be/6qAfkJGWsns It helped me to step upy profiling game quite a bit.