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
ConstructorDescriptionTimeWindowFixedBoundaryHistogram
(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles) TimeWindowFixedBoundaryHistogram
(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts) Create aTimeWindowFixedBoundaryHistogram
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Void
protected io.micrometer.core.instrument.distribution.FixedBoundaryHistogram
protected double[]
Return buckets.void
recordDouble
(double value) void
recordLong
(long value) final HistogramSnapshot
takeSnapshot
(long count, double total, double max)
-
Constructor Details
-
TimeWindowFixedBoundaryHistogram
public TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles) -
TimeWindowFixedBoundaryHistogram
public TimeWindowFixedBoundaryHistogram(Clock clock, DistributionStatisticConfig config, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts) Create aTimeWindowFixedBoundaryHistogram
instance.- Parameters:
clock
- clockconfig
- distribution statistic configurationsupportsAggregablePercentiles
- whether it supports aggregable percentilesisCumulativeBucketCounts
- whether it uses cumulative bucket counts- Since:
- 1.9.0
-
-
Method Details
-
getBuckets
protected double[] getBuckets()Return buckets.- Returns:
- buckets
- Since:
- 1.9.0
-
takeSnapshot
- Specified by:
takeSnapshot
in interfaceHistogram
-
recordLong
public void recordLong(long value) - Specified by:
recordLong
in interfaceHistogram
-
recordDouble
public void recordDouble(double value) - Specified by:
recordDouble
in interfaceHistogram
-
accumulatedHistogram
-
currentHistogram
protected io.micrometer.core.instrument.distribution.FixedBoundaryHistogram currentHistogram()
-