Class TimeWindowSum

java.lang.Object
io.micrometer.core.instrument.distribution.TimeWindowSum

public class TimeWindowSum extends Object
An implementation of a moving-window sum based on a configurable ring buffer.
Since:
1.4.0
  • Constructor Details

    • TimeWindowSum

      public TimeWindowSum(int bufferLength, Duration expiry)
  • Method Details

    • record

      public void record(long sampleMillis)
      For use by timer implementations.
      Parameters:
      sampleMillis - The value to record, in milliseconds.
    • poll

      public double poll()
      Returns:
      The sum, in milliseconds.