Pprof made easy at development time.
Add autopprof.Capture to your main function.
import "github.com/rakyll/autopprof"
autopprof.Capture(autopprof.CPUProfile{
Duration: 15 * time.Second,
})
Run your program and send SIGQUIT to the process (or press CTRL+\).
Profile capturing will start. Pprof UI will be started once capture is completed.