EWMA class
An exponentially-weighted moving average.
See :
Constructors
- EWMA(double _alpha, Duration _expectedTickInterval)
-
Create a new EWMA with a specific smoothing constant
_alpha
and the expected tick interval_expectedTickInterval
. - EWMA.fifteenMinuteEWMA()
- Creates a new EWMA which is equivalent to the UNIX fifteen minute load average and which expects to be ticked every 5 seconds.
- EWMA.fiveMinuteEWMA()
- Creates a new EWMA which is equivalent to the UNIX five minute load average and which expects to be ticked every 5 seconds.
- EWMA.likeUnixLoadAverage(Duration unixLoadAverageDuration, Duration expectedTickInterval)
- EWMA.oneMinuteEWMA()
- Creates a new EWMA which is equivalent to the UNIX one minute load average and which expects to be ticked every 5 seconds.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getRate(
Duration duration) → double -
Returns the rate in the given
duration
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tick(
) → void - Mark the passage of time (every microseconds) and decay the current rate accordingly.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
int n) → void -
Update the moving average with a new value
n
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited