Versions in this module Expand all Collapse all v0 v0.12.0 Sep 18, 2019 Changes in this version + func GetProcessorConstructor(fun string) (func(val float64, ts uint32) Processor, error) + func InitMetrics() + type Aggregator struct + Cache bool + DropRaw bool + Fun string + Interval uint + Key string + OutFmt string + Prefix string + Regex string + Sub string + Wait uint + func New(fun, regex, prefix, sub, outFmt string, cache bool, interval, wait uint, ...) (*Aggregator, error) + func NewMocked(fun, regex, prefix, sub, outFmt string, cache bool, interval, wait uint, ...) (*Aggregator, error) + func (a *Aggregator) AddMaybe(buf [][]byte, val float64, ts uint32) bool + func (a *Aggregator) AddOrCreate(key string, ts uint32, quantized uint, value float64) + func (a *Aggregator) Flush(cutoff uint) + func (a *Aggregator) PreMatch(buf []byte) bool + func (a *Aggregator) Shutdown() + func (a *Aggregator) Snapshot() *Aggregator + type Avg struct + func (a *Avg) Add(val float64, ts uint32) + func (a *Avg) Flush() ([]processorResult, bool) + type CacheEntry struct + type Count struct + func (c *Count) Add(val float64, ts uint32) + func (c *Count) Flush() ([]processorResult, bool) + type Delta struct + func (d *Delta) Add(val float64, ts uint32) + func (d *Delta) Flush() ([]processorResult, bool) + type Derive struct + func (d *Derive) Add(val float64, ts uint32) + func (d *Derive) Flush() ([]processorResult, bool) + type Last struct + func (l *Last) Add(val float64, ts uint32) + func (l *Last) Flush() ([]processorResult, bool) + type Max struct + func (m *Max) Add(val float64, ts uint32) + func (m *Max) Flush() ([]processorResult, bool) + type Min struct + func (m *Min) Add(val float64, ts uint32) + func (m *Min) Flush() ([]processorResult, bool) + type Percentiles struct + func (p *Percentiles) Add(val float64, ts uint32) + func (p *Percentiles) Flush() ([]processorResult, bool) + type Processor interface + Add func(val float64, ts uint32) + Flush func() ([]processorResult, bool) + func NewAvg(val float64, ts uint32) Processor + func NewCount(val float64, ts uint32) Processor + func NewDelta(val float64, ts uint32) Processor + func NewDerive(val float64, ts uint32) Processor + func NewLast(val float64, ts uint32) Processor + func NewMax(val float64, ts uint32) Processor + func NewMin(val float64, ts uint32) Processor + func NewPercentiles(val float64, ts uint32) Processor + func NewStdev(val float64, ts uint32) Processor + func NewSum(val float64, ts uint32) Processor + type RangeTracker struct + func NewRangeTracker() *RangeTracker + func (m *RangeTracker) Run() + func (m *RangeTracker) Sample(ts uint32) + type Stdev struct + func (s *Stdev) Add(val float64, ts uint32) + func (s *Stdev) Flush() ([]processorResult, bool) + type Sum struct + func (s *Sum) Add(val float64, ts uint32) + func (s *Sum) Flush() ([]processorResult, bool) + type TsSlice []uint + func (p TsSlice) Len() int + func (p TsSlice) Less(i, j int) bool + func (p TsSlice) Swap(i, j int)