Class MetricsHelper


  • public final class MetricsHelper
    extends Object
    Helper for recording metrics
    Author:
    pwinckles
    • Method Detail

      • time

        public static <T> T time​(io.micrometer.core.instrument.Timer timer,
                                 UncheckedCallable<T> callable)
        Records a timing metric around the code in the closure.
        Type Parameters:
        T - the return type
        Parameters:
        timer - the timer to record to
        callable - the closure to time
        Returns:
        the result of the closure