Class StepBucketHistogram
java.lang.Object
io.micrometer.core.instrument.step.StepValue<CountAtBucket[]>
io.micrometer.core.instrument.distribution.StepBucketHistogram
- All Implemented Interfaces:
Histogram
,AutoCloseable
A Histogram implementation which inherits the behaviour of step meters, i.e. read and
reset behaviour.
- Since:
- 1.11.0
-
Constructor Summary
ConstructorDescriptionStepBucketHistogram
(Clock clock, long stepMillis, DistributionStatisticConfig distributionStatisticConfig, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts) -
Method Summary
Modifier and TypeMethodDescriptionprotected CountAtBucket[]
noValue()
void
recordDouble
(double value) void
recordLong
(long value) takeSnapshot
(long count, double total, double max) protected Supplier
<CountAtBucket[]> Methods inherited from class io.micrometer.core.instrument.step.StepValue
_closingRollover, poll
-
Constructor Details
-
StepBucketHistogram
public StepBucketHistogram(Clock clock, long stepMillis, DistributionStatisticConfig distributionStatisticConfig, boolean supportsAggregablePercentiles, boolean isCumulativeBucketCounts)
-
-
Method Details
-
recordLong
public void recordLong(long value) - Specified by:
recordLong
in interfaceHistogram
-
recordDouble
public void recordDouble(double value) - Specified by:
recordDouble
in interfaceHistogram
-
takeSnapshot
- Specified by:
takeSnapshot
in interfaceHistogram
-
valueSupplier
- Specified by:
valueSupplier
in classStepValue<CountAtBucket[]>
-
noValue
- Specified by:
noValue
in classStepValue<CountAtBucket[]>
- Returns:
- value that should be returned by
StepValue.poll()
if within the first step period or if the previous step didn't record a value.
-