Files
etcd/Documentation/profiling.md
Brandon Philips c2077ed0b6 feat(server): add net/http/pprof endpoints
Add some basic profiling endpoints over http to start digging into
memory and request latencies.
2014-01-15 15:03:29 -08:00

556 B

Profiling

etcd exposes profiling information from the Go pprof package over HTTP. The basic browseable interface can be found at http://127.0.0.1:4001/debug/pprof.

Heap memory profile

go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/heap

CPU profile

go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/profile

Blocked goroutine profile

go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/block

For more information on using the tools see http://blog.golang.org/profiling-go-programs