Seven ways to Profile Go Applications
summary
Seven concrete ways to profile Go: use shell time and tool exec to wrap compiler/linker commands (used while speeding the compiler by roughly 40%); enable runtime debug flags to watch GC churn; use pprof CPU/memory/block profiles (memory samples default to 1/8000 allocations and remember one profile at a time); run benchmarks via testing or the package profile for whole programs; attach net/http/pprof in production; use perf now that Go 1.7 exposes frame pointers; and capture go tool trace for goroutine-level timelines.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:08Time
- 5:34Go Debug
- 7:59Profilers
- 10:39Paperoff
- 17:40Debug Paperoff
- 19:39PeopleOff
- 21:47PerfPerfect
- 23:33Flame graphs
- 25:25Go Tool Trace
related talks
19mProfiling Your Code: 5 Tips to Significantly Boost Performance
33mProfiling Code
05mHow To Profile Compilation Duration?
26mProfiling Mastery: Decode Your Data and Elevate Observability
31mProfiler: Profiling Code
30mProfiling CPU and Memory on Linux, with Opensource Graphical Tools
50mProgram Analysis
59mUnleashing the Go Toolchain
