Documentation ¶
Index ¶
- func CombineTree(leftTree, rightTree *Tree) (*Tree, *Tree)
- type Flamebearer
- type Format
- type Tree
- func (t *Tree) Bytes(d *dict.Dict, maxNodes int) ([]byte, error)
- func (t *Tree) Clone(r *big.Rat) *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) Iterate(cb func(key []byte, val uint64))
- func (t *Tree) MarshalJSON() ([]byte, error)
- func (t *Tree) Merge(srcTrieI merge.Merger)
- func (t *Tree) Samples() uint64
- func (t *Tree) Serialize(d *dict.Dict, maxNodes int, w io.Writer) error
- func (t *Tree) SerializeNoDict(maxNodes int, w io.Writer) error
- func (t *Tree) SerializeTruncate(d *dict.Dict, maxNodes int, w io.Writer) error
- func (t *Tree) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineTree ¶ added in v0.0.38
CombineTree aligns 2 trees by making them having the same structure with the same number of nodes TODO: create a new struct?
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"` }
func CombineToFlamebearerStruct ¶ added in v0.0.38
func CombineToFlamebearerStruct(leftTree, rightTree *Tree, maxNodes int) *Flamebearer
CombineToFlamebearerStruct generates the Flamebearer struct from 2 trees. They must be the response trees from CombineTree (i.e. all children nodes must be the same length). The Flamebearer struct returned from this function is different to the one returned from Tree.FlamebearerStruct(). It has the following structure:
i+0 = x offset, left tree i+1 = total , left tree i+2 = self , left tree i+3 = x offset, right tree i+4 = total , right tree i+5 = self , right tree i+6 = index in the names array
type Tree ¶
func (*Tree) FlamebearerStruct ¶
func (t *Tree) FlamebearerStruct(maxNodes int) *Flamebearer
func (*Tree) MarshalJSON ¶
func (*Tree) SerializeTruncate ¶ added in v0.0.40
Click to show internal directories.
Click to hide internal directories.