Documentation ¶
Index ¶
- type Agent
- type Config
- type Key
- type KeyCount
- type Sketch
- func (s *Sketch) ApproxEquals(o *Sketch, e float64) bool
- func (s *Sketch) Cols() (k []int32, n []uint32)
- func (s *Sketch) Copy() *Sketch
- func (s *Sketch) CopyTo(dst *Sketch)
- func (s *Sketch) Equals(o *Sketch) bool
- func (s *Sketch) GetRawBins() (int, string)
- func (s *Sketch) Insert(c *Config, vals ...float64)
- func (s *Sketch) InsertMany(c *Config, values []float64)
- func (s *Sketch) MemSize() (used, allocated int)
- func (s *Sketch) Merge(c *Config, o *Sketch)
- func (s *Sketch) Quantile(c *Config, q float64) float64
- func (s *Sketch) Reset()
- func (s *Sketch) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
An Agent sketch is an insert optimized version of the sketch for use in the datadog-agent.
func (*Agent) InsertInterpolate ¶
InsertInterpolate linearly interpolates a count from the given lower to upper bounds
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
A Config struct is passed around to many sketches (read-only).
type Key ¶
type Key int16
A Key represents a quantized version of a float64. See Config for more details
type KeyCount ¶
type KeyCount struct {
// contains filtered or unexported fields
}
A KeyCount represents a Key and an associated count
type Sketch ¶
type Sketch struct { Basic summary.Summary `json:"summary"` // contains filtered or unexported fields }
A Sketch for tracking quantiles The serialized JSON of Sketch contains the summary only Bins are not included.
func ConvertDDSketchIntoSketch ¶
ConvertDDSketchIntoSketch converts a DDSketch into a Sketch, by first converting the DDSketch into a new DDSketch with a mapping that's compatible with Sketch parameters, then creating the Sketch by copying the DDSketch bins to the Sketch store.
func (*Sketch) ApproxEquals ¶
ApproxEquals checks if s and o are equivalent, with e error allowed for Sum and Average
func (*Sketch) GetRawBins ¶
GetRawBins return raw bins information as string
func (*Sketch) Insert ¶
Insert a single value into the sketch. NOTE: InsertMany is much more efficient.
func (*Sketch) InsertMany ¶
InsertMany values into the sketch.
func (*Sketch) MemSize ¶
MemSize returns memory use in bytes:
used: uses len(bins) allocated: uses cap(bins)