Class MetricsUtil


  • public final class MetricsUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.codahale.metrics.Timer.Context startTimer​(com.codahale.metrics.Timer timer)
      Starts the Metric Timer.
      static void stopTimer​(com.codahale.metrics.Timer.Context context)
      Stops the Metric Timer context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • startTimer

        public static com.codahale.metrics.Timer.Context startTimer​(com.codahale.metrics.Timer timer)
        Starts the Metric Timer.

        If the given timer was null, it will silently return null.

        Parameters:
        timer - timer to start
        Returns:
        timing context, if timer was not null
      • stopTimer

        public static void stopTimer​(com.codahale.metrics.Timer.Context context)
        Stops the Metric Timer context.

        If the given context was null, it will silently be ignored.

        Parameters:
        context - timing context to stop, if not null.