Class NoopLongTaskTimer

All Implemented Interfaces:
HistogramSupport, LongTaskTimer, Meter

public class NoopLongTaskTimer
extends NoopMeter
implements LongTaskTimer
  • Constructor Details

    • NoopLongTaskTimer

      public NoopLongTaskTimer​(Meter.Id id)
  • Method Details

    • start

      public LongTaskTimer.Sample start()
      Description copied from interface: LongTaskTimer
      Start keeping time for a task.
      Specified by:
      start in interface LongTaskTimer
      A task id that can be used to look up how long the task has been running.
    • duration

      public double duration​(java.util.concurrent.TimeUnit unit)
      Specified by:
      duration in interface LongTaskTimer
      unit - The time unit to scale the duration to.
      The cumulative duration of all current tasks.
    • activeTasks

      public int activeTasks()
      Specified by:
      activeTasks in interface LongTaskTimer
      The current number of tasks being executed.
    • max

      public double max​(java.util.concurrent.TimeUnit unit)
      Description copied from interface: LongTaskTimer
      The amount of time the longest running task has been running
      Specified by:
      max in interface LongTaskTimer
      unit - The time unit to scale the max to.
      The maximum active task duration.
    • takeSnapshot

      public HistogramSnapshot takeSnapshot()
      Description copied from interface: HistogramSupport
      Summary statistics should be published off of a single snapshot instance so that, for example, there isn't disagreement between the distribution's bucket counts because more events continue to stream in.
      Specified by:
      takeSnapshot in interface HistogramSupport
      A snapshot of all distribution statistics at a point in time.
    • baseTimeUnit

      public java.util.concurrent.TimeUnit baseTimeUnit()
      Specified by:
      baseTimeUnit in interface LongTaskTimer
      The base time unit of the long task timer to which all published metrics will be scaled