Skip to content

go-perf/easypprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easypprof

build-img pkg-img reportcard-img coverage-img version-img

Easy pprof library for Go.

Note

Check go-profiler-notes for more information about profiling in Go.

Features

  • Simple API.
  • Easy to integrate.
  • Configurable.
  • Supports fgprof.
  • Improved version of pkg/profile.

Install

Go version 1.17+

go get github.com/go-perf/easypprof

Example

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.

Documentation

See these docs.

License

MIT License.