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 TypeMethodDescriptionint
getBucketIndex
(int i) long
getCount
(int i) iterator()
static NativeHistogramBuckets
of
(int[] bucketIndexes, long[] counts) To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usenewBuilder()
.static NativeHistogramBuckets
To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usenewBuilder()
.int
size()
stream()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Method Details
-
of
To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usenewBuilder()
.- Parameters:
bucketIndexes
- see class javadoc ofNativeHistogramBuckets
. May be empty.counts
- must have the same length as bucketIndexes
-
of
To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usenewBuilder()
.- Parameters:
bucketIndexes
- see class javadoc ofNativeHistogramBuckets
. May be empty.counts
- must have the same size as bucketIndexes
-
size
-
iterator
- Specified by:
iterator
in interfaceIterable<NativeHistogramBucket>
-
stream
-
getBucketIndex
-
getCount
-
newBuilder
-