track.aggregators package¶
Submodules¶
track.aggregators.aggregator module¶
-
class
track.aggregators.aggregator.Aggregator[source]¶ Bases:
objectAttributes: valReturn the last observed value
Methods
lazy(aggregator_t, \*\*kwargs)Lazily instantiate the underlying aggregator append to_json -
val¶ Return the last observed value
-
class
track.aggregators.aggregator.RingAggregator(n, dtype='f')[source]¶ Bases:
track.aggregators.aggregator.AggregatorSaves the n last elements. Start overriding the elements once n elements is reached
Attributes: valReturn the last observed value
Methods
lazy(n, dtype)Lazily instantiate the underlying aggregator append to_json -
val¶ Return the last observed value
-
class
track.aggregators.aggregator.StatAggregator(skip_obs=10)[source]¶ Bases:
track.aggregators.aggregator.AggregatorCompute mean, sd, min, max; does not keep the entire history. This is useful if you are worried about memory usage and the values should not vary much. i.e keeping the entire history is not useful.
Attributes: - avg
- max
- min
- sd
- sum
- total
valReturn the last observed value
Methods
lazy(skip)Lazily instantiate the underlying aggregator append from_json to_json -
avg¶
-
max¶
-
min¶
-
sd¶
-
sum¶
-
total¶
-
val¶ Return the last observed value
-
class
track.aggregators.aggregator.TimeSeriesAggregator[source]¶ Bases:
track.aggregators.aggregator.AggregatorKeeps the entire history of the metric
Attributes: valReturn the last observed value
Methods
lazy()Lazily instantiate the underlying aggregator append to_json -
val¶ Return the last observed value
-
class
track.aggregators.aggregator.ValueAggregator(val=None)[source]¶ Bases:
track.aggregators.aggregator.AggregatorDoes not Aggregate only keeps the latest value
Attributes: valReturn the last observed value
Methods
lazy()Lazily instantiate the underlying aggregator append to_json -
val¶ Return the last observed value