java.lang.Object
io.quarkus.micrometer.runtime.binder.mpmetrics.TimerAdapter
All Implemented Interfaces:
MeterHolder, org.eclipse.microprofile.metrics.Counting, org.eclipse.microprofile.metrics.Metered, org.eclipse.microprofile.metrics.Metric, org.eclipse.microprofile.metrics.Sampling, org.eclipse.microprofile.metrics.SimpleTimer, org.eclipse.microprofile.metrics.Timer

public class TimerAdapter extends Object implements org.eclipse.microprofile.metrics.Timer, org.eclipse.microprofile.metrics.SimpleTimer, MeterHolder
  • Field Details

    • registry

      final io.micrometer.core.instrument.MeterRegistry registry
    • timer

      io.micrometer.core.instrument.Timer timer
  • Constructor Details

    • TimerAdapter

      TimerAdapter(io.micrometer.core.instrument.MeterRegistry registry)
  • Method Details

    • register

      public TimerAdapter register(MpMetadata metadata, MetricDescriptor descriptor)
    • update

      public void update(long l, TimeUnit timeUnit)
    • update

      public void update(Duration duration)
      Specified by:
      update in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      update in interface org.eclipse.microprofile.metrics.Timer
    • time

      public <T> T time(Callable<T> callable) throws Exception
      Specified by:
      time in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      time in interface org.eclipse.microprofile.metrics.Timer
      Throws:
      Exception
    • time

      public void time(Runnable runnable)
      Specified by:
      time in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      time in interface org.eclipse.microprofile.metrics.Timer
    • time

      Specified by:
      time in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      time in interface org.eclipse.microprofile.metrics.Timer
    • getElapsedTime

      public Duration getElapsedTime()
      Specified by:
      getElapsedTime in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      getElapsedTime in interface org.eclipse.microprofile.metrics.Timer
    • getCount

      public long getCount()
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.Counting
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.Metered
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.SimpleTimer
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.Timer
    • getMaxTimeDuration

      public Duration getMaxTimeDuration()
      Specified by:
      getMaxTimeDuration in interface org.eclipse.microprofile.metrics.SimpleTimer
    • getMinTimeDuration

      public Duration getMinTimeDuration()
      Specified by:
      getMinTimeDuration in interface org.eclipse.microprofile.metrics.SimpleTimer
    • getFifteenMinuteRate

      public double getFifteenMinuteRate()
      Specified by:
      getFifteenMinuteRate in interface org.eclipse.microprofile.metrics.Metered
      Specified by:
      getFifteenMinuteRate in interface org.eclipse.microprofile.metrics.Timer
    • getFiveMinuteRate

      public double getFiveMinuteRate()
      Specified by:
      getFiveMinuteRate in interface org.eclipse.microprofile.metrics.Metered
      Specified by:
      getFiveMinuteRate in interface org.eclipse.microprofile.metrics.Timer
    • getMeanRate

      public double getMeanRate()
      Specified by:
      getMeanRate in interface org.eclipse.microprofile.metrics.Metered
      Specified by:
      getMeanRate in interface org.eclipse.microprofile.metrics.Timer
    • getOneMinuteRate

      public double getOneMinuteRate()
      Specified by:
      getOneMinuteRate in interface org.eclipse.microprofile.metrics.Metered
      Specified by:
      getOneMinuteRate in interface org.eclipse.microprofile.metrics.Timer
    • getSnapshot

      public org.eclipse.microprofile.metrics.Snapshot getSnapshot()
      Specified by:
      getSnapshot in interface org.eclipse.microprofile.metrics.Sampling
      Specified by:
      getSnapshot in interface org.eclipse.microprofile.metrics.Timer
    • getMeter

      public io.micrometer.core.instrument.Meter getMeter()
      Specified by:
      getMeter in interface MeterHolder
    • start

      public io.micrometer.core.instrument.Timer.Sample start()
    • stop

      public void stop(io.micrometer.core.instrument.Timer.Sample sample)
    • getType

      public org.eclipse.microprofile.metrics.MetricType getType()
      Specified by:
      getType in interface MeterHolder