pprof

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBytes

func FromBytes(input []byte, fn func(*profilev1.Profile, int) error) error

Read Profile from Bytes

func FromProfile added in v0.1.2

func FromProfile(p *profile.Profile) (*profilev1.Profile, error)

Types

type Profile

type Profile struct {
	*profilev1.Profile
	// contains filtered or unexported fields
}

func OpenFile

func OpenFile(path string) (*Profile, error)

func RawFromBytes

func RawFromBytes(input []byte) (_ *Profile, err error)

Read RawProfile from bytes

func (*Profile) Close

func (p *Profile) Close()

func (*Profile) Normalize

func (p *Profile) Normalize()

Normalize normalizes the profile by:

  • Removing all duplicate samples (summing their values).
  • Removing redundant profile labels (byte => unique of an allocation site) todo: We should reassess if this was a good choice because by merging duplicate stacktrace samples we cannot recompute the allocation per site ("bytes") profile label.
  • Removing empty samples.
  • Then remove unused references.
  • Ensure that the profile has a time_nanos set
  • Removes addresses from symbolized profiles.

func (*Profile) SizeBytes

func (p *Profile) SizeBytes() int

func (*Profile) WriteTo

func (p *Profile) WriteTo(w io.Writer) (int64, error)

WriteTo writes the profile to the given writer.

type StacktracesHasher

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

func (StacktracesHasher) Hashes

func (h StacktracesHasher) Hashes(samples []*profilev1.Sample) []uint64

todo we might want to reuse the results to avoid allocations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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