Documentation
¶
Overview ¶
Package profile represents a pprof profile as a directed graph.
This package is a simplified fork of github.com/google/pprof/internal/graph.
Package profile provides a representation of github.com/google/pprof/proto/profile.proto and methods to encode/decode/merge profiles in this format.
Index ¶
- Variables
- type Demangler
- type Edge
- type EdgeMap
- type Function
- type Graph
- type Label
- type Line
- type Location
- type Mapping
- type Node
- type NodeInfo
- type NodeMap
- type NodePtrSet
- type NodeSet
- type Nodes
- type Options
- type Profile
- func (p *Profile) Aggregate(inlineFrame, function, filename, linenumber, address bool) error
- func (p *Profile) CheckValid() error
- func (p *Profile) Compatible(pb *Profile) error
- func (p *Profile) Copy() *Profile
- func (p *Profile) Demangle(d Demangler) error
- func (p *Profile) Empty() bool
- func (p *Profile) FilterSamplesByTag(focus, ignore TagMatch) (fm, im bool)
- func (p *Profile) HasFileLines() bool
- func (p *Profile) HasFunctions() bool
- func (p *Profile) Merge(pb *Profile, r float64) error
- func (p *Profile) Normalize(pb *Profile) error
- func (p *Profile) Prune(dropRx, keepRx *regexp.Regexp)
- func (p *Profile) RemoveUninteresting() error
- func (p *Profile) Scale(ratio float64)
- func (p *Profile) ScaleN(ratios []float64) error
- func (p *Profile) String() string
- func (p *Profile) Write(w io.Writer) error
- type Sample
- type TagMatch
- type ValueType
Constants ¶
This section is empty.
Variables ¶
var ErrNoData = fmt.Errorf("empty input file")
Functions ¶
This section is empty.
Types ¶
type Demangler ¶
Demangler maps symbol names to a human-readable form. This may include C++ demangling and additional simplification. Names that are not demangled may be missing from the resulting map.
type Edge ¶ added in go1.23.0
type Edge struct {
Src, Dest *Node
// The summary weight of the edge
Weight, WeightDiv int64
// residual edges connect nodes that were connected through a
// separate node, which has been removed from the report.
Residual bool
// An inline edge represents a call that was inlined into the caller.
Inline bool
}
Edge contains any attributes to be represented about edges in a graph.
func (*Edge) WeightValue ¶ added in go1.23.0
WeightValue returns the weight value for this edge, normalizing if a divisor is available.
type EdgeMap ¶ added in go1.23.0
type EdgeMap []*Edge
EdgeMap is used to represent the incoming/outgoing edges from a node.
type Function ¶
type Function struct {
ID uint64
Name string
SystemName string
Filename string
StartLine int64
// contains filtered or unexported fields
}
Function corresponds to Profile.Function
type Graph ¶ added in go1.23.0
type Graph struct {
Nodes Nodes
}
Graph summarizes a performance profile into a format that is suitable for visualization.
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
Label corresponds to Profile.Label