Easy pprof library for Go.
Check go-profiler-notes for more information about profiling in Go.
- Simple API.
- Easy to integrate.
- Configurable.
- Supports fgprof.
- Improved version of pkg/profile.
Go version 1.17+
go get github.com/go-perf/easypprof
func main() {
cfg := easypprof.Config{
Mode: easypprof.CpuMode,
OutputDir: path.Join(".", "test_pprof"),
FilePrefix: "my-app",
}
defer easypprof.Start(cfg).Stop()
// your code
}
See examples for more: examples_test.go.
See these docs.