profiling

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeCPUNanos       = "go:profile_cpu:nanoseconds"
	TypeHeapInuseSpace = "go:profile_heap:inuse_space"
	TypeHeapAllocSpace = "go:profile_heap:alloc_space"
)

Variables

This section is empty.

Functions

func BuildRows added in v1.8.9

func BuildRows(projectId uuid.UUID, decoded []Decoded) ([]models.ProfileStack, []models.ProfileSample, []models.Profile)

func HashFrames

func HashFrames(frames []string) uint64

func IsGauge added in v1.8.9

func IsGauge(profileType string) bool

Types

type Decoded

type Decoded struct {
	Meta    Meta
	Stacks  []Stack
	Samples []Sample
}

type Decoder

type Decoder interface {
	Decode(ctx IngestContext, payload []byte) ([]Decoded, error)
}

type IngestContext

type IngestContext struct {
	ProjectId          uuid.UUID
	DefaultServiceName string
	ServerName         string
	AppVersion         string
	ReceivedAt         time.Time
}

type Meta

type Meta struct {
	ServiceName string
	Start       time.Time
	End         time.Time
	ServerName  string
	AppVersion  string
	Attributes  map[string]string
	TraceId     *string
	SpanId      *string
}

type OTLPDecoder added in v1.8.9

type OTLPDecoder struct{}

func (OTLPDecoder) Decode added in v1.8.9

func (OTLPDecoder) Decode(ctx IngestContext, payload []byte) ([]Decoded, error)

type PprofDecoder

type PprofDecoder struct{}

func (PprofDecoder) Decode

func (PprofDecoder) Decode(ctx IngestContext, payload []byte) ([]Decoded, error)

type Sample

type Sample struct {
	Type      string
	StackHash uint64
	Value     int64
}

type Stack

type Stack struct {
	Hash   uint64
	Frames []string
}

Jump to

Keyboard shortcuts

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