ess.reduce.streaming.RollingAccumulator#

class ess.reduce.streaming.RollingAccumulator(window=10, **kwargs)[source]#

Accumulator that adds pushed values to a rolling window.

Does not support event data.

__init__(window=10, **kwargs)[source]#
Parameters:

window (int, default: 10) – Size of the rolling window.

Methods

__init__([window])

clear()

Clear the accumulated values.

push(value)

Push a value to the accumulator.

Attributes

is_empty

Check if the accumulator is empty.

value

Get the accumulated value.

clear()[source]#

Clear the accumulated values.

Return type:

None

property is_empty: bool#

Check if the accumulator is empty.

Returns:

True if the accumulator is empty, False otherwise.