Package org.fcrepo.common.metrics
Class MetricsHelper
- java.lang.Object
-
- org.fcrepo.common.metrics.MetricsHelper
-
public final class MetricsHelper extends Object
Helper for recording metrics- Author:
- pwinckles
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
time(io.micrometer.core.instrument.Timer timer, UncheckedCallable<T> callable)
Records a timing metric around the code in the closure.
-
-
-
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 tocallable
- the closure to time- Returns:
- the result of the closure
-
-