Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpMovingAverage ¶
type ExpMovingAverage struct {
// contains filtered or unexported fields
}
ExpMovingAverage ...
func NewExpMovingAverage ¶
func NewExpMovingAverage(ttl time.Duration, initValue float64) (*ExpMovingAverage, error)
NewExpMovingAverage ...
func (*ExpMovingAverage) Add ¶
func (ema *ExpMovingAverage) Add(value float64) float64
Add adds a value and returns the new average
func (*ExpMovingAverage) Get ¶
func (ema *ExpMovingAverage) Get() float64
Get returns the current average
Click to show internal directories.
Click to hide internal directories.