Module io.prometheus.metrics.model
Class NativeHistogramBuckets
java.lang.Object
io.prometheus.metrics.model.snapshots.NativeHistogramBuckets
- All Implemented Interfaces:
Iterable<NativeHistogramBucket>
Immutable representation of native histogram buckets.
The bucket index defines the boundaries of the bucket, depending on the histogram's schema.
base = 2^(2^-schema)
lower bound = base^(index - 1)
upper bound = base^index
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()intgetBucketIndex(int i) longgetCount(int i) iterator()static NativeHistogramBucketsof(int[] bucketIndexes, long[] counts) To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().static NativeHistogramBucketsTo create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().intsize()stream()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Method Details
-
of
To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().- Parameters:
bucketIndexes- see class javadoc ofNativeHistogramBuckets. May be empty.counts- must have the same length as bucketIndexes
-
of
To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().- Parameters:
bucketIndexes- see class javadoc ofNativeHistogramBuckets. May be empty.counts- must have the same size as bucketIndexes
-
size
public int size() -
iterator
- Specified by:
iteratorin interfaceIterable<NativeHistogramBucket>
-
stream
-
getBucketIndex
public int getBucketIndex(int i) -
getCount
public long getCount(int i) -
builder
-