Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type Accumulator[T int64 | float64] interface { Add(value []T) error Buckets() []T Count() uint64 Sum() []T Avg() []T }
All accumulators are treated as a histogram, This might not be very memory efficient, but it lets us treat them almost identically in the rest of the code.
type AccumulatorImpl ¶
func NewAccumulatorImlp ¶
func NewAccumulatorImlp[T int64 | float64](buckets []T) *AccumulatorImpl[T]
func (*AccumulatorImpl[T]) Add ¶
func (a *AccumulatorImpl[T]) Add(value []T) error
func (*AccumulatorImpl[T]) Avg ¶
func (a *AccumulatorImpl[T]) Avg() []T
func (*AccumulatorImpl[T]) Buckets ¶
func (a *AccumulatorImpl[T]) Buckets() []T
func (*AccumulatorImpl[T]) Count ¶
func (a *AccumulatorImpl[T]) Count() uint64
func (*AccumulatorImpl[T]) Sum ¶
func (a *AccumulatorImpl[T]) Sum() []T
Click to show internal directories.
Click to hide internal directories.