pprof

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader, p *tree.Profile) error

func DecodePool

func DecodePool(r io.Reader, fn func(*tree.Profile) error) error

Types

type Parser added in v0.19.0

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

func NewParser added in v0.19.0

func NewParser(config ParserConfig) *Parser

func (*Parser) Convert added in v0.19.0

func (p *Parser) Convert(ctx context.Context, startTime, endTime time.Time, profile *tree.Profile, cumulativeOnly bool) error

func (*Parser) ParsePprof added in v0.19.0

func (p *Parser) ParsePprof(ctx context.Context, startTime, endTime time.Time, bs []byte, cumulativeOnly bool) error

func (*Parser) Reset added in v0.19.0

func (p *Parser) Reset()

type ParserConfig added in v0.19.0

type ParserConfig struct {
	Putter              storage.Putter
	SpyName             string
	Labels              map[string]string
	SkipExemplars       bool
	SampleTypes         map[string]*tree.SampleTypeConfig
	StackFrameFormatter StackFrameFormatter
}

type ParserInterface added in v0.37.0

type ParserInterface interface {
	ParsePprof(ctx context.Context, startTime, endTime time.Time, bs []byte, cumulativeOnly bool) error
}

type RawProfile added in v0.19.0

type RawProfile struct {

	// Initializes lazily on Bytes, if not present.
	RawData             []byte // Represents raw request body as per ingestion API.
	FormDataContentType string // Set optionally, if RawData is multipart form.
	// Initializes lazily on Parse, if not present.
	Profile             []byte // Represents raw pprof data.
	PreviousProfile     []byte // Used for cumulative type only.
	SkipExemplars       bool
	StreamingParser     bool
	PoolStreamingParser bool
	ArenasEnabled       bool
	SampleTypeConfig    map[string]*tree.SampleTypeConfig
	// contains filtered or unexported fields
}

func (*RawProfile) Bytes added in v0.19.0

func (p *RawProfile) Bytes() ([]byte, error)

func (*RawProfile) ContentType added in v0.19.0

func (p *RawProfile) ContentType() string

func (*RawProfile) Parse added in v0.19.0

func (*RawProfile) ParseWithWriteBatch added in v0.37.1

func (p *RawProfile) ParseWithWriteBatch(c context.Context, wb stackbuilder.WriteBatchFactory, md ingestion.Metadata) error

func (*RawProfile) Push added in v0.19.0

func (p *RawProfile) Push(profile []byte, cumulative bool) *RawProfile

Push loads data from profile to RawProfile making it eligible for Bytes and Parse calls.

Returned RawProfile should be used at the next Push: the method established relationship between these two RawProfiles in order to propagate internal pprof parser state lazily on a successful Parse call. This is necessary for cumulative profiles that require two consecutive samples to calculate the diff. If parser is not present due to a failure, or sequence violation, the profiles will be re-parsed.

type RbspyFormatter added in v0.28.0

type RbspyFormatter struct {
}

type StackFrameFormatter added in v0.28.0

type StackFrameFormatter interface {
	// contains filtered or unexported methods
}

func StackFrameFormatterForSpyName added in v0.28.0

func StackFrameFormatterForSpyName(spyName string) StackFrameFormatter

type UnsafeFunctionNameFormatter added in v0.28.0

type UnsafeFunctionNameFormatter struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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