Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 527 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 527 Bytes

Embedded pgo-fleet profiler

import "github.com/t2bot/pgo-fleet/embedded"

Usage

See godoc for detailed docs.

Quickstart:

endpoint, err := pgo.NewCollectorEndpoint("https://collector.example.org/v1/submit", "YourSecretKeyGoesHere")
if err != nil {
	panic(err)
}

// Run a profile about once an hour for 5 minutes, submitting to the given endpoint
pgo.Enable(1 * time.Hour, 5 * time.Minute, endpoint)

// Stop collecting profiles
pgo.Disable()