Interface ExponentialHistogramBuckets
@Immutable
public interface ExponentialHistogramBuckets
ExponentialHistogramBuckets represents either the positive or negative measurements taken for a
ExponentialHistogramPointData.
The bucket boundaries are lower-bound exclusive, and are calculated using the ExponentialHistogramPointData.getScale() and the getOffset().
For example, assume ExponentialHistogramPointData.getScale() is 0, the base is 2.0.
Then, if offset is 0, the bucket lower bounds would be 1.0, 2.0, 4.0, 8.0, etc. If
offset is -3, the bucket lower bounds would be 0.125, 0.25, 0.5, 1.0, 2,0, etc. If
offset is +3, the bucket lower bounds would be 8.0, 16.0, 32.0, etc.
- Since:
- 1.23.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExponentialHistogramBucketsCreate a record.The bucket counts is a list of counts representing number of measurements that fall into each bucket.intThe offset shifts the bucket boundaries according tolower_bound = base^(offset+i).intgetScale()The scale of the buckets.longThe total count is the sum of all the values in the buckets.
-
Method Details
-
create
Create a record.- Since:
- 1.50.0
-
getScale
int getScale()The scale of the buckets. Must align withExponentialHistogramPointData.getScale(). -
getOffset
int getOffset()The offset shifts the bucket boundaries according tolower_bound = base^(offset+i)..- Returns:
- the offset.
-
getBucketCounts
The bucket counts is a list of counts representing number of measurements that fall into each bucket.- Returns:
- the bucket counts.
-
getTotalCount
long getTotalCount()The total count is the sum of all the values in the buckets.- Returns:
- the total count.
-