profile

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlatProfile

type FlatProfile struct {
	Meta        InstantProfileMeta
	FlatSamples map[string]*Sample
}

func CopyInstantFlatProfile

func CopyInstantFlatProfile(p InstantProfile) *FlatProfile

func FlatProfileFromPprof

func FlatProfileFromPprof(ctx context.Context, logger log.Logger, metaStore metastore.ProfileMetaStore, p *profile.Profile, sampleIndex int) (*FlatProfile, error)

func FlatProfilesFromPprof

func FlatProfilesFromPprof(ctx context.Context, l log.Logger, s metastore.ProfileMetaStore, p *profile.Profile) ([]*FlatProfile, error)

FlatProfilesFromPprof extracts a Profile from each sample index included in the pprof profile.

func (*FlatProfile) ProfileMeta

func (fp *FlatProfile) ProfileMeta() InstantProfileMeta

func (*FlatProfile) Samples

func (fp *FlatProfile) Samples() map[string]*Sample

type InstantFlatProfile

type InstantFlatProfile interface {
	ProfileMeta() InstantProfileMeta
	Samples() map[string]*Sample
}

type InstantProfile

type InstantProfile interface {
	ProfileMeta() InstantProfileMeta
	Samples() map[string]*Sample
}

func NewScaledInstantProfile

func NewScaledInstantProfile(p InstantProfile, ratio float64) InstantProfile

type InstantProfileMeta

type InstantProfileMeta struct {
	PeriodType ValueType
	SampleType ValueType
	Timestamp  int64
	Duration   int64
	Period     int64
}

func ProfileMetaFromPprof

func ProfileMetaFromPprof(p *profile.Profile, sampleIndex int) InstantProfileMeta

type Sample

type Sample struct {
	Location  []*metastore.Location
	Value     int64
	DiffValue int64
	Label     map[string][]string
	NumLabel  map[string][]int64
	NumUnit   map[string][]string
}

func MakeSample

func MakeSample(value int64, locationIds []uuid.UUID) *Sample

MakeSample creates a sample from a stack trace (list of locations) and a value. Mostly meant for testing.

type ScaledInstantProfile

type ScaledInstantProfile struct {
	// contains filtered or unexported fields
}

func (*ScaledInstantProfile) ProfileMeta

func (p *ScaledInstantProfile) ProfileMeta() InstantProfileMeta

func (*ScaledInstantProfile) Samples

func (p *ScaledInstantProfile) Samples() map[string]*Sample

type StacktraceKey

type StacktraceKey []byte

func MakeStacktraceKey

func MakeStacktraceKey(sample *Sample) StacktraceKey

MakeStacktraceKey generates stacktraceKey to be used as a key for maps.

type ValueType

type ValueType struct {
	Type string
	Unit string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL