org.apache.lens.server.api.metrics
Class MethodMetrics
java.lang.Object
org.apache.lens.server.api.metrics.MethodMetrics
public class MethodMetrics
- extends Object
metrics measuring for resource methods. Every resource method has one timer and two meters associated with it. One
meter is marking number of invocations of the method, another is marking number of invocations where exception
occurred.
Nested Class Summary |
class |
MethodMetrics.Context
Inner class instances handle contexts for the same instance of MethodMetrics. |
Constructor Summary |
MethodMetrics(com.codahale.metrics.Meter meter,
com.codahale.metrics.Timer successTimer,
com.codahale.metrics.Timer exceptionTimer)
|
MethodMetrics
public MethodMetrics(@NonNull
com.codahale.metrics.Meter meter,
@NonNull
com.codahale.metrics.Timer successTimer,
@NonNull
com.codahale.metrics.Timer exceptionTimer)
newContext
public MethodMetricsContext newContext()
- Create and return new context since an execution of this method has started
getCount
public long getCount()
getSuccessCount
public long getSuccessCount()
getErrorCount
public long getErrorCount()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.