Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists "The service uses too much CPU" and "memory keeps growing" are the two most common questions about a Go program in production, and Go answers both with tools built into the toolchain: pprof for sampling…
Go for DevOps: Profiling with pprof, CPU and Heap Profiles, the Goroutine Endpoint and Escape Analysis
Find why a Go program is slow or growing: record a CPU profile and read it with go tool pprof (flat versus cumulative time), find a leaking cache with a heap profile, inspect a live service through net/http/pprof (safely), and see what the compiler moves to the heap.
Sign in free to read this script, along with the rest of the library.
Sign in free