GO profiling using pprof
dev.to·1d·
Discuss: DEV
🚀Performance
Preview
Report Post

Have you ever spent nights trying to understand why your application is using so many resources? Your CPU is on fire, memory keeps growing, latency goes up… and the code looks fine. Probably, you’re guessing instead of verifying.

In this article, we’ll see how to verify possible memory leaks, unused resources and bad optimized code using the Go built-in profiling tool pprof.

What is pprof?

pprof is Go builtin profiling tool that allows you to collect and analyze runtime data from your application, such as CPU usage, memory allocations, goroutines, and blocking operations.

In simple terms, pprof answers questions like:

  • Why is my application slow?
  • Where is CPU time being spent?
  • What is allocating so much memory?
  • Are goroutines leaking?

Spoiler: pprof does not m…

Similar Posts

Loading similar posts...