Back to

Package stack

v0.0.0 (86f327c)
Latest Go to latest
Published: Nov 7, 2018 | License: MIT | Module:


Package Files

type Profile

type Profile struct {
	SampleNames []string
	Samples     []*Sample

Profile represents a parsed pprof profile.

func NewProfile

func NewProfile(names []string) (*Profile, error)

NewProfile returns a new profile with the specified sample names.

type Sample

type Sample struct {
	// Funcs is parent first.
	Funcs  []string
	Counts []int64

Sample represents the sample count for a specific call stack.

func NewSample

func NewSample(funcs []string, counts []int64) *Sample

NewSample returns a new sample with a copy of the counts.

func (*Sample) Add

func (s *Sample) Add(counts []int64) error

Add combines counts with the existing counts for this sample.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier