Class TimeWindowMax
java.lang.Object
io.micrometer.core.instrument.distribution.TimeWindowMax
An implementation of a decaying maximum for a distribution based on a configurable ring buffer.
-
Constructor Summary
ConstructorDescriptionTimeWindowMax(Clock clock, long rotateFrequencyMillis, int bufferLength)
TimeWindowMax(Clock clock, DistributionStatisticConfig config)
-
Method Summary
-
Constructor Details
-
TimeWindowMax
-
TimeWindowMax
-
-
Method Details
-
record
For use by timer implementations.- Parameters:
sample
- The value to record.timeUnit
- The unit of time of the incoming sample.
-
poll
- Parameters:
timeUnit
- The base unit of time to scale the max to.- Returns:
- A max scaled to the base unit of time. For use by timer implementations.
-
poll
public double poll()- Returns:
- An unscaled max. For use by distribution summary implementations.
-
record
public void record(double sample)For use by distribution summary implementations.- Parameters:
sample
- The value to record.
-