Hacker News new | past | comments | ask | show | jobs | submit login
Profiling Go Programs (CLI Edition) (benchkram.de)
33 points by equanos on April 8, 2023 | hide | past | favorite | 3 comments



Needlessly complicated for most CLI applications. A better starting point:

https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program


On this topic I highly recommend Bill Kennedy's talk: https://youtu.be/6qAfkJGWsns

It helped me to step upy profiling game quite a bit.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: