Step 1
Install dependencies:
apt-get install graphviz gv
or
brew install graphviz
Step 2
Download pprof to your application
go get -u github.com/google/pprof
Step 3
Import pprof to your application
import _ "net/http/pprof"
Step 4
Add pprof server to application e.g. main.go