prof

package
v0.0.0-...-b32920f Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileToSortedProfile

func FileToSortedProfile(f *os.File, verbose int) (*profile.Profile, int, float64)

FileToSortedProfile reads a file containing possibly compressed protobuf form of pprof data, and returns the profile.Profile contained with, plus the Sample[*].Value index of the sample count and the sum of those counts.

Types

type FileLine

type FileLine struct {
	SourceFile string
	Line       int64
}

type ProfileItem

type ProfileItem struct {
	FlatPercent float64
	FlatTotal   float64
	FileLine    []FileLine
}

ProfileItem represents one sample location, and provides the percentage of the total and the outermost-first slice of file-and-line positions.

func FromProtoBuf

func FromProtoBuf(profiles []string, combine, innermost bool, verbose int) ([]*ProfileItem, error)

FromProtoBuf runs go tool pprof on the supplied profiles to generate the (-flat, -lines) protobuf output, and then processes that protobuf to yield a sorted profile of sample percentages and sample locations. If combine is true, samples with equal file(s) and line(s) are merged.

type ValueType

type ValueType struct {
	Type string // cpu, wall, inuse_space, etc
	Unit string // seconds, nanoseconds, bytes, etc
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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