profile

package
v0.0.0-...-a53e426 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PyroscopeNodeJs = "node"
	PyroscopeGolang = "go"
	PyroscopeRust   = "rs"
	PyroscopeDotnet = "dotnet"
	PyroscopeRuby   = "rb"
	PyroscopePython = "py"
	PyroscopeJava   = "java"
	PyroscopeEbpf   = "ebpf"
	PyroscopePhp    = "php"
	Unknown         = "unknown"
)

Variables

View Source
var (
	CPUType       = Type{Name: "cpu", Kind: "profile_cpu"}
	MemType       = Type{Name: "mem", Kind: "profile_mem"}
	MutexType     = Type{Name: "mutex", Kind: "profile_mutex"}
	BlockType     = Type{Name: "block", Kind: "profile_block"}
	ExceptionType = Type{Name: "exception", Kind: "profile_exception"}
	GoroutineType = Type{Name: "goroutines", Kind: "profile_goroutines"}
	UnknownType   = Type{Name: "unknown", Kind: "profile_unknown"}
)

Functions

func FormatPositionAndName

func FormatPositionAndName(str string, t FormatType) string

func FormatPostionAndNames

func FormatPostionAndNames(strs []string, t FormatType) []string

func GetProfileID

func GetProfileID(meta *Meta) string

func IsLegalType

func IsLegalType(t Type) bool

Types

type AggType

type AggType string
const (
	AvgAggType AggType = "avg"
	SumAggType AggType = "sum"
)

type CallbackFunc

type CallbackFunc func(id uint64, stack *Stack, vals []uint64, types, units, aggs []string, startTime, endTime int64, labels map[string]string)

type Format

type Format string
const (
	FormatPprof      Format = "pprof"
	FormatJFR        Format = "jfr"
	FormatTrie       Format = "trie"
	FormatTree       Format = "tree"
	FormatLines      Format = "lines"
	FormatGroups     Format = "groups"
	FormatSpeedscope Format = "speedscope"
)

type FormatType

type FormatType string

type Input

type Input struct {
	Profile  RawProfile
	Metadata Meta
}

type Meta

type Meta struct {
	StartTime       time.Time
	EndTime         time.Time
	Tags            map[string]string
	SpyName         string
	SampleRate      uint32
	Units           Units
	AggregationType AggType
}

type RawProfile

type RawProfile interface {
	Parse(ctx context.Context, meta *Meta, tags map[string]string) (logs []*protocol.Log, err error)
}

type SequenceType

type SequenceType int
const (
	PosFirst SequenceType
	FunctionFirst
)

type Stack

type Stack struct {
	Name  string
	Stack []string
}

type Type

type Type struct {
	Name string
	Kind string
}

func DetectProfileType

func DetectProfileType(valType string) Type

type Units

type Units string
const (
	SamplesUnits         Units = "samples"
	NanosecondsUnit      Units = "nanoseconds"
	ObjectsUnit          Units = "objects"
	BytesUnit            Units = "bytes"
	GoroutinesUnits      Units = "goroutines"
	LockNanosecondsUnits Units = "lock_nanoseconds"
	LockSamplesUnits     Units = "lock_samples"
)

func (Units) DetectValueType

func (u Units) DetectValueType() string

Directories

Path Synopsis
pyroscope
jfr
raw

Jump to

Keyboard shortcuts

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