pprof

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SampleAggregated mean samples are accumulated in ebpf, no need to dedup these
	SampleAggregated = SampleAggregation(true)
)
View Source
var SampleTypeCpu = SampleType(0)
View Source
var SampleTypeMem = SampleType(1)

Functions

func Collect added in v0.4.2

func Collect(builders *ProfileBuilders, collector SamplesCollector) error

Types

type BuildersOptions added in v0.4.2

type BuildersOptions struct {
	SampleRate    int64
	PerPIDProfile bool
}

type CollectProfilesCallback added in v0.4.2

type CollectProfilesCallback func(sample ProfileSample)

type ProfileBuilder

type ProfileBuilder struct {
	Profile *profile.Profile
	Labels  labels.Labels
	// contains filtered or unexported fields
}

func (*ProfileBuilder) CreateSample added in v0.4.0

func (p *ProfileBuilder) CreateSample(inputSample *ProfileSample)

func (*ProfileBuilder) CreateSampleOrAddValue added in v0.4.0

func (p *ProfileBuilder) CreateSampleOrAddValue(inputSample *ProfileSample)

func (*ProfileBuilder) Write

func (p *ProfileBuilder) Write(dst io.Writer) (int64, error)

type ProfileBuilders

type ProfileBuilders struct {
	Builders map[builderHashKey]*ProfileBuilder
	// contains filtered or unexported fields
}

func NewProfileBuilders

func NewProfileBuilders(options BuildersOptions) *ProfileBuilders

func (*ProfileBuilders) AddSample added in v0.4.2

func (b *ProfileBuilders) AddSample(sample *ProfileSample)

func (*ProfileBuilders) BuilderForSample added in v0.4.2

func (b *ProfileBuilders) BuilderForSample(sample *ProfileSample) *ProfileBuilder

type ProfileSample added in v0.4.2

type ProfileSample struct {
	Target      *sd.Target
	Pid         uint32
	SampleType  SampleType
	Aggregation SampleAggregation
	Stack       []string
	Value       uint64
	Value2      uint64
}

type SampleAggregation added in v0.4.2

type SampleAggregation bool

type SampleType added in v0.4.2

type SampleType uint32

type SamplesCollector added in v0.4.2

type SamplesCollector interface {
	CollectProfiles(callback CollectProfilesCallback) error
}

Jump to

Keyboard shortcuts

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