Buckets are implemented using two different arrays:
Note that we'll always have n+1 buckets, where n is the number of boundaries. This is because we need to count events that are below the lowest boundary.
Example: if we measure the values: [5, 30, 5, 40, 5, 15, 15, 15, 25] with the boundaries [ 10, 20, 30 ], we will have the following state:
buckets: { boundaries: [10, 20, 30], counts: [3, 3, 1, 2], }
Generated using TypeDoc
DataPoint value type for HistogramAggregation.