aggregate

package
v1.21.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 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