Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SampleFormat ¶
func SampleFormat(p *profile.Profile, sampleIndex string, mean bool) (value, meanDiv sampleValueFunc, v *profile.ValueType, err error)
sampleFormat returns a function to extract values out of a profile.Sample, and the type/units of those values.
func ShortenFunctionName ¶
ShortenFunctionName returns a shortened version of a function's name.
Types ¶
type Stack ¶
type Stack struct { Value int64 // Total value for all samples of this stack. Sources []int // Indices in StackSet.Sources (callers before callees). }
Stack holds a single stack instance.
type StackSet ¶
type StackSet struct { Total int64 // Total value of the profile. Scale float64 // Multiplier to generate displayed value Type string // Profile type. E.g., "cpu". Unit string // One of "B", "s", "GCU", or "" (if unknown) Stacks []Stack // List of stored stacks Sources []StackSource // Mapping from source index to info }
StackSet holds a set of stacks corresponding to a profile.
Slices in StackSet and the types it contains are always non-nil, which makes Javascript code that uses the JSON encoding less error-prone.
func (*StackSet) FillPlaces ¶
func (s *StackSet) FillPlaces()
func (*StackSet) MakeInitialStacks ¶
type StackSource ¶
type StackSource struct { FullName string FileName string UniqueName string // Disambiguates functions with same names Inlined bool // If true this source was inlined into its caller // Alternative names to display (with decreasing lengths) to make text fit. // Guaranteed to be non-empty. Display []string // Places holds the list of stack slots where this source occurs. // In particular, if [a,b] is an element in Places, // StackSet.Stacks[a].Sources[b] points to this source. // // No stack will be referenced twice in the Places slice for a given // StackSource. In case of recursion, Places will contain the outer-most // entry in the recursive stack. E.g., if stack S has source X at positions // 4,6,9,10, the Places entry for X will contain [S,4]. Places []StackSlot // Combined count of stacks where this source is the leaf. Self int64 // Color number to use for this source. // Colors with high numbers than supported may be treated as zero. Color int }
StackSource holds function/location info for a stack entry.
Click to show internal directories.
Click to hide internal directories.