Go runtime Get pro ling data through Benchmark tests $ go test -v -run=^$ -bench=^ -cpuprofile=prof.cpu $ go tool pprof [binary].test prof.cpu pprof HTTP handlers import _ net/http/pprof $ go tool pprof http://localhost:8080/debug/pprof/profile code runtime.StartCPUPro le or runtime.WriteHeapPro le
too much time worrying about e ciency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming. Donald Ervin Knuth sources: golang.org/pkg/net/http/pprof/ (https://golang.org/pkg/net/http/pprof/) github.com/uber/go-torch (https://github.com/uber/go-torch)