Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (23 loc) · 1.27 KB

File metadata and controls

54 lines (23 loc) · 1.27 KB

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(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(Type, AggregationValue) = #{type => Type, rows => data_rows(AggregationValue)}

data_rows(AggregationValue) = [#{tags => tv(), value => AggregationValue}]

tv() = [oc_tags:value()]