http server的pprof
Briefly describe how to use pprof to monitor the performance of http server.
Answer
Add `import _ "net/http/pprof"` in the main.go
Run the following commands to get info correspondingly:
CPU profile:
go tool pprof http://localhost:6060/debug/pprof/profile --second N
heap profile:
go tool pprof http://localhost:6060/debug/pprof/heap
goroutine blocking profile:
go tool pprof http://localhost:6060/debug/pprof/block