Categorygithub.com/t2bot/pgo-fleet/embedded
package
1.0.1
Repository: https://github.com/t2bot/pgo-fleet.git
Documentation: pkg.go.dev

# README

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()