A comprehensive guide to Go profiling using pprof, covering CPU, memory (heap/allocs), block, mutex, and goroutine profiles. Explains how each profile type works, when to use them, and how to interpret results. Covers three collection methods: runtime/pprof for code-controlled profiling, net/http/pprof for long-running services, and GoLand's new built-in profiler tool (v2026.1.2+). Also walks through inspecting profiles via terminal commands, the pprof web interface, and GoLand's flame graph, call graph, top, tree, and line profiler views.
Table of contents
How does profiling work in Go?Types of profiles in GoHow to collect Go profilesHow to inspect profilesWhy try GoLand’s profiler?19.8K Impressions1 Comment