Jupyter Notebook My notes on the various go profiling methods that are available.
go-profiler-notes
I've just started a new job at Datadog to work on Continuous Profiling for Go. To make sure that I know what I'm talking about, I'm planning to do an in-depth study of the existing profilers and how they work. I'll try to summarize what I learned in this repository as it might be useful to others.
Diagnostics: Has a very good overview over the available profiling and tracing facilities but doesn't go into a lot of depth.
runtime/pprof: Lists the available profiles and has a little more explanation about what kind of data they produce.
runtime: Has documentation on the various control knobs and pprof facilities, e.g. MemProfileRate.
net/http/pprof: Not a lot of docs, but diving into the code from there shows how the various profilers can be started/stopped on demand.
JDB
Profiler labels in Go: An introduction to using pprof labels and how they allow you to add additional context to your profiles.
Custom pprof profiles: Example for using custom profiles, shows tracking open/close events of a blob store and how to figure out how many blobs are open at a given time.
Using Instruments to profile Go programs: How to use the macOS Instruments app (I think it's built on dtrace) to profile Go programs. Not clear what the benfits are, if any.