Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + const ValueTypeTopKMatrix + type CountMinSketch struct + func NewCountMinSketch(w, d uint32) (*CountMinSketch, error) + func (s *CountMinSketch) Add(event string, count int) + func (s *CountMinSketch) ConservativeAdd(event string, count uint32) (uint32, uint32, uint32) + func (s *CountMinSketch) ConservativeIncrement(event string) (uint32, uint32, uint32) + func (s *CountMinSketch) Count(event string) uint32 + func (s *CountMinSketch) Increment(event string) + func (s *CountMinSketch) Merge(from *CountMinSketch) error + type DDSketchQuantile struct + func DDSketchQuantileFromProto(buf []byte) (*DDSketchQuantile, error) + func NewDDSketch() *DDSketchQuantile + func (d *DDSketchQuantile) Merge(other QuantileSketch) (QuantileSketch, error) + func (d *DDSketchQuantile) Quantile(quantile float64) (float64, error) + func (d *DDSketchQuantile) Release() + func (d *DDSketchQuantile) ToProto() *logproto.QuantileSketch + type MinHeap []*node + func (h *MinHeap) Find(e string) (int, bool) + func (h *MinHeap) Peek() interface{} + func (h *MinHeap) Pop() interface{} + func (h *MinHeap) Push(x interface{}) + func (h MinHeap) Len() int + func (h MinHeap) Less(i, j int) bool + func (h MinHeap) Swap(i, j int) + type QuantileSketch interface + Add func(float64) error + Merge func(QuantileSketch) (QuantileSketch, error) + Quantile func(float64) (float64, error) + Release func() + ToProto func() *logproto.QuantileSketch + func NewTDigestSketch() QuantileSketch + func QuantileSketchFromProto(proto *logproto.QuantileSketch) (QuantileSketch, error) + type QuantileSketchFactory func() QuantileSketch + type TDigestQuantile struct + func TDigestQuantileFromProto(proto *logproto.TDigest) *TDigestQuantile + func (d *TDigestQuantile) Add(count float64) error + func (d *TDigestQuantile) Merge(other QuantileSketch) (QuantileSketch, error) + func (d *TDigestQuantile) Quantile(quantile float64) (float64, error) + func (d *TDigestQuantile) Release() + func (d *TDigestQuantile) ToProto() *logproto.QuantileSketch + type TopKMatrix []TopKVector + func TopKMatrixFromProto(proto *logproto.TopKMatrix) (TopKMatrix, error) + func (TopKMatrix) String() string + func (TopKMatrix) Type() parser.ValueType + func (s TopKMatrix) ToProto() (*logproto.TopKMatrix, error) + type TopKResult []element + func (t TopKResult) Len() int + func (t TopKResult) Less(i, j int) bool + func (t TopKResult) Swap(i, j int) + type TopKVector struct + type Topk struct + func NewCMSTopkForCardinality(l log.Logger, k, c int) (*Topk, error) + func TopkFromProto(t *logproto.TopK) (*Topk, error) + func (t *Topk) Cardinality() (uint64, bool) + func (t *Topk) InTopk(h1, h2 uint32) bool + func (t *Topk) Merge(from *Topk) error + func (t *Topk) Observe(event string) + func (t *Topk) ToProto() (*logproto.TopK, error) + func (t *Topk) Topk() TopKResult