pprofutil

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkSamples

func WalkSamples(p *profile.Profile, visit func(s Sample))

WalkSamples is a convenience function for looping over time samples. For instance, it can be used to loop over time/ns data.

It calls a given function for every non-empty location with all "lines" combined into a stack.

Types

type Sample

type Sample struct {
	Value int64

	// Stack contains line entries for this sample.
	// Stack[0] is a current function.
	// Stack[1:] is a slice of the callers.
	//
	// The stack is never empty if this Sample object is provided
	// by the WalkSamples function.
	Stack []profile.Line
}

Sample holds data of the current sample in a convenient way.

See WalkSamples.

type Symbol

type Symbol struct {
	PkgPath  string
	PkgName  string
	TypeName string
	FuncName string
}

Symbol represents a parsed profile.proto function name.

func ParseFuncName

func ParseFuncName(s string) Symbol

ParseFuncName parses a profile.proto Function.Name.

Jump to

Keyboard shortcuts

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