Interface Timer

All Superinterfaces:
Metric
All Known Implementing Classes:
TimerImpl

@LimitedPrivate("Coprocesssor") @Evolving public interface Timer extends Metric
A metric which encompasses a Histogram and Meter.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    void
    update(long duration, TimeUnit unit)
    Update the timer with the given duration in given time unit.
    default void
    updateMicros(long durationMicros)
    Update the timer with the given duration in microseconds
    default void
    updateMillis(long durationMillis)
    Update the timer with the given duration in milliseconds
    default void
    updateNanos(long durationNanos)
    Update the timer with the given duration in nanoseconds
  • Method Details

    • update

      void update(long duration, TimeUnit unit)
      Update the timer with the given duration in given time unit.
      Parameters:
      duration - the duration of the event
      unit - the time unit for the duration
    • updateMillis

      default void updateMillis(long durationMillis)
      Update the timer with the given duration in milliseconds
      Parameters:
      durationMillis - the duration of the event in ms
    • updateMicros

      default void updateMicros(long durationMicros)
      Update the timer with the given duration in microseconds
      Parameters:
      durationMicros - the duration of the event in microseconds
    • updateNanos

      default void updateNanos(long durationNanos)
      Update the timer with the given duration in nanoseconds
      Parameters:
      durationNanos - the duration of the event in ns
    • getHistogram

    • getMeter

      @Private Meter getMeter()