Documentation
¶
Index ¶
- Constants
- Variables
- func FindCandidateFiles(basePath string) (map[string]InstallationCandidate, error)
- func Install(basePath string, appName string, profileTypes []string) error
- func ProfileTypesToCode(p string) ([]string, error)
- func Uninstall(basePath string) (map[string]InstallationCandidate, error)
- type InstallationCandidate
Constants ¶
View Source
const (
InstallationFileName = "pyroscope_test.go"
)
Variables ¶
View Source
var AvailableProfileTypes = []pyroscope.ProfileType{ pyroscope.ProfileCPU, pyroscope.ProfileInuseObjects, pyroscope.ProfileAllocObjects, pyroscope.ProfileInuseSpace, pyroscope.ProfileAllocSpace, pyroscope.ProfileGoroutines, pyroscope.ProfileMutexCount, pyroscope.ProfileMutexDuration, pyroscope.ProfileBlockCount, pyroscope.ProfileBlockDuration, }
TODO: maybe upstream should export this?
Functions ¶
func FindCandidateFiles ¶ added in v1.3.0
func FindCandidateFiles(basePath string) (map[string]InstallationCandidate, error)
FindCandidateFiles finds files candidate for installation
func Install ¶
Install Install the pyroscope agent into test packages It does that by recursively finding packages with tests Then it generates a `pyroscope_test.go` file for each package With the profile type and app name specified
func ProfileTypesToCode ¶
ProfileTypesToCode converts ProfileTypes flags into the name it's used in the agent code TODO: unify this with upstream https://github.com/pyroscope-io/client/blob/46ac3c0a285626dbf2ef17e017fae2e1b985ee12/pyroscope/types.go#L14-L26
Types ¶
type InstallationCandidate ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.