 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func FindFunction(x *profilev1.Profile, fid uint64) (*profilev1.Function, bool)
- func FindFunctionName(x *profilev1.Profile, locID uint64) (string, bool)
- func FindLocation(x *profilev1.Profile, lid uint64) (*profilev1.Location, bool)
- func Get(x *profilev1.Profile, sampleType string, ...) error
- func SampleTypes(x *profilev1.Profile) []string
- type Flamebearer
- type Format
- type PprofMetadata
- type SampleTypeConfig
- type StackBuilder
- type Tree
- func (t *Tree) Clone(r *big.Rat) *Tree
- func (t *Tree) Collapsed() string
- func (t *Tree) Diff(x *Tree) *Tree
- func (t *Tree) FlamebearerStruct(maxNodes int) *Flamebearer
- func (t *Tree) Insert(key []byte, value uint64)
- func (t *Tree) InsertInt(key []byte, value int)
- func (t *Tree) InsertStack(stack [][]byte, v uint64)
- func (t *Tree) InsertStackString(stack []string, v uint64)
- func (t *Tree) Iterate(cb func(key []byte, val uint64))
- func (t *Tree) IterateStacks(cb func(name string, self uint64, stack []string))
- func (t *Tree) IterateWithStackBuilder(sb StackBuilder, cb func(stackID uint64, val uint64))
- func (t *Tree) MarshalJSON() ([]byte, error)
- func (t *Tree) Merge(srcTrieI merge.Merger)
- func (t *Tree) Pprof(mdata *PprofMetadata) *profilev1.Profile
- func (t *Tree) Samples() uint64
- func (t *Tree) Scale(s uint64)
- func (t *Tree) String() string
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var DefaultSampleTypeMapping = map[string]*SampleTypeConfig{ "samples": { DisplayName: "cpu", Units: metadata.SamplesUnits, Sampled: true, }, "inuse_objects": { Units: metadata.ObjectsUnits, Aggregation: metadata.AverageAggregationType, }, "alloc_objects": { Units: metadata.ObjectsUnits, Cumulative: true, }, "inuse_space": { Units: metadata.BytesUnits, Aggregation: metadata.AverageAggregationType, }, "alloc_space": { Units: metadata.BytesUnits, Cumulative: true, }, "goroutine": { DisplayName: "goroutines", Units: metadata.GoroutinesUnits, Aggregation: metadata.AverageAggregationType, }, "contentions": { DisplayName: "mutex_count", Units: metadata.LockSamplesUnits, Cumulative: true, }, "delay": { DisplayName: "mutex_duration", Units: metadata.LockNanosecondsUnits, Cumulative: true, }, }
DefaultSampleTypeMapping contains default settings for every supported pprof sample type. These settings are required to build a proper storage.PutInput payload.
TODO(kolesnikovae): We should find a way to eliminate collisions.
For example, both Go 'block' and 'mutex' profiles have
'contentions' and 'delay' sample types - this means we can't
override display name of the profile types and they would
be indistinguishable for the server.
The keys should have the following structure:
	{origin}.{profile_type}.{sample_type}
Example names (can be a reserved label, e.g __type__):
  * go.cpu.samples
  * go.block.delay
  * go.mutex.delay
  * nodejs.heap.objects
Another problem is that in pull mode we don't have spy-name, therefore we should solve this problem first.
Functions ¶
func SampleTypes ¶ added in v1.13.0
Types ¶
type Flamebearer ¶
type Flamebearer struct {
	Names    []string `json:"names"`
	Levels   [][]int  `json:"levels"`
	NumTicks int      `json:"numTicks"`
	MaxSelf  int      `json:"maxSelf"`
	// TODO: see note in render.go
	SpyName    string `json:"spyName"`
	SampleRate uint32 `json:"sampleRate"`
	Units      string `json:"units"`
	Format     Format `json:"format"`
}
    type PprofMetadata ¶
type SampleTypeConfig ¶
type SampleTypeConfig struct {
	Units       metadata.Units           `json:"units,omitempty" yaml:"units,omitempty"`
	DisplayName string                   `json:"display-name,omitempty" yaml:"display-name,omitempty"`
	Aggregation metadata.AggregationType `json:"aggregation,omitempty" yaml:"aggregation,omitempty"`
	Cumulative  bool                     `json:"cumulative,omitempty" yaml:"cumulative,omitempty"`
	Sampled     bool                     `json:"sampled,omitempty" yaml:"sampled,omitempty"`
}
    type StackBuilder ¶
type Tree ¶
func (*Tree) FlamebearerStruct ¶
func (t *Tree) FlamebearerStruct(maxNodes int) *Flamebearer
func (*Tree) InsertStack ¶
func (*Tree) InsertStackString ¶
func (*Tree) IterateStacks ¶
func (*Tree) IterateWithStackBuilder ¶
func (t *Tree) IterateWithStackBuilder(sb StackBuilder, cb func(stackID uint64, val uint64))
func (*Tree) MarshalJSON ¶
 Click to show internal directories. 
   Click to hide internal directories.