aggregate

package
v1.23.0-rc10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MovingWindowAverage

type MovingWindowAverage interface {
	Record(val int64)
	Average() float64
}
var NoopMovingWindowAverage MovingWindowAverage = newNoopMovingWindowAverage()

type MovingWindowAvgImpl

type MovingWindowAvgImpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMovingWindowAvgImpl

func NewMovingWindowAvgImpl(
	windowSize time.Duration,
	maxBufferSize int,
) *MovingWindowAvgImpl

func (*MovingWindowAvgImpl) Average

func (a *MovingWindowAvgImpl) Average() float64

func (*MovingWindowAvgImpl) Record

func (a *MovingWindowAvgImpl) Record(val int64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL