Go Memory Leaks detection

July 9th, 2014

Gopher Golang logo
Golang package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

To use pprof, import this package into your program:

import _ "net/http/pprof"

If the app is not running an http server, one needs to start one:

go func() {
  log.Println(http.ListenAndServe("localhost:6060", nil))

Then its just point the browser to:


More at: Golang package pprof.