Class TimeWindowFixedBoundaryHistogram
java.lang.Object
io.micrometer.core.instrument.distribution.TimeWindowFixedBoundaryHistogram
- All Implemented Interfaces:
Histogram,AutoCloseable
A histogram implementation that does not support precomputed percentiles but supports
aggregable percentile histograms and SLO boundaries. There is no need for a high
dynamic range histogram and its more expensive memory footprint if all we are
interested in is fixed histogram counts.
- Since:
- 1.0.3
-
Constructor Summary
ConstructorsModifierConstructorDescriptionTimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles) Create aTimeWindowFixedBoundaryHistograminstance with cumulative bucket counts and buckets based on theconfigandsupportsAggregablePercentiles.TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts) Create aTimeWindowFixedBoundaryHistograminstance with buckets based on theconfigandsupportsAggregablePercentiles.protectedTimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts, boolean includeInfinityBucket) Create aTimeWindowFixedBoundaryHistograminstance with buckets based on theconfigandsupportsAggregablePercentiles. -
Method Summary
Modifier and TypeMethodDescriptionprotected Voidprotected io.micrometer.core.instrument.distribution.FixedBoundaryHistogramprotected double[]Return buckets.voidrecordDouble(double value) voidrecordLong(long value) final HistogramSnapshottakeSnapshot(long count, double total, double max)
-
Constructor Details
-
TimeWindowFixedBoundaryHistogram
public TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles) Create aTimeWindowFixedBoundaryHistograminstance with cumulative bucket counts and buckets based on theconfigandsupportsAggregablePercentiles.- Parameters:
clock- clockconfig- distribution statistic configurationsupportsAggregablePercentiles- whether the backend supports aggregable percentiles- See Also:
-
TimeWindowFixedBoundaryHistogram
public TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts) Create aTimeWindowFixedBoundaryHistograminstance with buckets based on theconfigandsupportsAggregablePercentiles.- Parameters:
clock- clockconfig- distribution statistic configurationsupportsAggregablePercentiles- whether the backend supports aggregable percentilesisCumulativeBucketCounts- whether to use cumulative bucket counts- Since:
- 1.9.0
- See Also:
-
TimeWindowFixedBoundaryHistogram
protected TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts, boolean includeInfinityBucket) Create aTimeWindowFixedBoundaryHistograminstance with buckets based on theconfigandsupportsAggregablePercentiles. This constructor allows for use cases that always need an infinity bucket in the histogram.- Parameters:
clock- clockconfig- distribution statistic configurationsupportsAggregablePercentiles- whether the backend supports aggregable percentilesisCumulativeBucketCounts- whether to use cumulative bucket countsincludeInfinityBucket- whether to always include an infinity bucket- Since:
- 1.13.11
- See Also:
-
-
Method Details
-
getBuckets
protected double[] getBuckets()Return buckets.- Returns:
- buckets
- Since:
- 1.9.0
-
takeSnapshot
- Specified by:
takeSnapshotin interfaceHistogram
-
recordLong
public void recordLong(long value) - Specified by:
recordLongin interfaceHistogram
-
recordDouble
public void recordDouble(double value) - Specified by:
recordDoublein interfaceHistogram
-
accumulatedHistogram
-
currentHistogram
protected io.micrometer.core.instrument.distribution.FixedBoundaryHistogram currentHistogram()
-