fgprof

https://github.com/felixge/fgprof



fgprof is a sampling Go profiler that allows you to analyze On-CPU as well as Off-CPU (e.g. I/O) time together.



import(
_ “net/http/pprof”
“github.com/felixge/fgprof”
)



func main() {
http.DefaultServeMux.Handle(“/debug/fgprof”, fgprof.Handler())
go func() {
log.Println(http.ListenAndServe(“:6060”, nil))
}()



// <code to profile> }


Category golang