Class StepFunctionTimer<T>

java.lang.Object
io.micrometer.core.instrument.step.StepFunctionTimer<T>
All Implemented Interfaces:
FunctionTimer, Meter

public class StepFunctionTimer<T> extends Object implements FunctionTimer
A timer that tracks monotonically increasing functions for count and totalTime.
  • Constructor Details

  • Method Details

    • count

      public double count()
      The total number of occurrences of the timed event.
      Specified by:
      count in interface FunctionTimer
      Returns:
      The total number of occurrences of the timed event.
    • totalTime

      public double totalTime(TimeUnit unit)
      The total time of all occurrences of the timed event.
      Specified by:
      totalTime in interface FunctionTimer
      Parameters:
      unit - The base unit of time to scale the total to.
      Returns:
      The total time of all occurrences of the timed event.
    • getId

      public Meter.Id getId()
      Specified by:
      getId in interface Meter
      Returns:
      A unique combination of name and tags
    • baseTimeUnit

      public TimeUnit baseTimeUnit()
      Specified by:
      baseTimeUnit in interface FunctionTimer
      Returns:
      The base time unit of the timer to which all published metrics will be scaled
    • type

      public Meter.Type type()
    • _closingRollover

      public void _closingRollover()