pdata

package
v0.0.0-...-0958f0d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecutableCacheLifetime = 1 * time.Hour
	FramesCacheLifetime     = 1 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pdata

type Pdata struct {

	// Executables stores metadata for executables.
	Executables *lru.SyncedLRU[libpf.FileID, samples.ExecInfo]

	// Frames maps frame information to its source location.
	Frames *lru.SyncedLRU[
		libpf.FileID,
		*xsync.RWMutex[map[libpf.AddressOrLineno]samples.SourceInfo],
	]

	// ExtraSampleAttrProd is an optional hook point for adding custom
	// attributes to samples.
	ExtraSampleAttrProd samples.SampleAttrProducer
	// contains filtered or unexported fields
}

Pdata holds the cache for the data used to generate the events reporters will export when handling OTLP data.

func New

func New(samplesPerSecond int, executablesCacheElements, framesCacheElements uint32,
	extra samples.SampleAttrProducer) (*Pdata, error)

func (Pdata) Generate

Generate generates a pdata request out of internal profiles data, to be exported.

func (Pdata) Purge

func (p Pdata) Purge()

Purge purges all the expired data

Jump to

Keyboard shortcuts

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