Module oc_stat_aggregation
Aggregation represents a data aggregation method.
This module defines the oc_stat_aggregation
behaviour. Required callback functions: init/3
, type/0
, add_sample/4
, export/2
, clear_rows/2
.
Data Types
data()
data() = data(latest, number()) | data(count, number()) | data(sum, #{count => non_neg_integer(), mean => number(), sum => number()}) | data(distribution, #{count => non_neg_integer(), mean => number(), sum => number(), buckets => [{number(), non_neg_integer()}]})
data()
data(Type, AggregationValue) = #{type => Type, rows => data_rows(AggregationValue)}
data_rows()
data_rows(AggregationValue) = [#{tags => tv(), value => AggregationValue}]
tv()
tv() = [oc_tags:value()]