Package org.onlab.metrics
Class MetricsUtil
- java.lang.Object
-
- org.onlab.metrics.MetricsUtil
-
public final class MetricsUtil extends 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.
-
-
-
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.
-
-