reporter

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildersOptions

type BuildersOptions struct {
	SampleRate    int64
	PerPIDProfile bool
	Origin        libpf.Origin
}

type Config

type Config struct {
	ReportInterval            time.Duration
	SamplesPerSecond          int64
	Demangle                  string
	ReporterUnsymbolizedStubs bool

	ExtraNativeSymbolResolver samples.NativeSymbolResolver
	Consumer                  PPROFConsumer
}

type PPROF

type PPROF struct {
	Raw    []byte
	Labels labels.Labels
	Origin libpf.Origin
}

type PPROFConsumer

type PPROFConsumer interface {
	ConsumePprofProfiles(ctx context.Context, p []PPROF)
}

type PPROFConsumerFunc

type PPROFConsumerFunc func(ctx context.Context, p []PPROF)

func (PPROFConsumerFunc) ConsumePprofProfiles

func (f PPROFConsumerFunc) ConsumePprofProfiles(ctx context.Context, p []PPROF)

type PPROFReporter

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

func NewPPROF

func NewPPROF(
	log log.Logger,
	cfg *Config,
	sd discovery.TargetProducer,
) *PPROFReporter

func (*PPROFReporter) ReportTraceEvent

func (p *PPROFReporter) ReportTraceEvent(trace *libpf.Trace, meta *samples.TraceEventMeta) error

func (*PPROFReporter) Start

func (p *PPROFReporter) Start(ctx context.Context) error

func (*PPROFReporter) Stop

func (p *PPROFReporter) Stop()

type ProfileBuilder

type ProfileBuilder struct {
	Profile *profile.Profile
	Target  *discovery.Target
	// contains filtered or unexported fields
}

func (*ProfileBuilder) AddValue

func (p *ProfileBuilder) AddValue(v int64, sample *profile.Sample)

func (*ProfileBuilder) FakeMapping

func (p *ProfileBuilder) FakeMapping() *profile.Mapping

func (*ProfileBuilder) Function

func (p *ProfileBuilder) Function(function, file libpf.String) *profile.Function

func (*ProfileBuilder) Location

func (*ProfileBuilder) Mapping

func (p *ProfileBuilder) Mapping(
	start libpf.Address,
	file libpf.FrameMappingFile,
) (*profile.Mapping, bool)

func (*ProfileBuilder) NewSample

func (p *ProfileBuilder) NewSample(locSize int) *profile.Sample

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

func (b *ProfileBuilders) BuilderForSample(
	target *discovery.Target,
	pid uint32,
) *ProfileBuilder

Jump to

Keyboard shortcuts

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