@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) public class MetricsTimeVaryingRate extends MetricsBase
NO_DESCRIPTION| Constructor and Description |
|---|
MetricsTimeVaryingRate(String nam,
MetricsRegistry registry)
Constructor - create a new metric
|
MetricsTimeVaryingRate(String nam,
MetricsRegistry registry,
String description)
Constructor - create a new metric
|
| Modifier and Type | Method and Description |
|---|---|
long |
getMaxTime()
The max time for a single operation since the last reset
resetMinMax() |
long |
getMinTime()
The min time for a single operation since the last reset
resetMinMax() |
long |
getPreviousIntervalAverageTime()
The average rate of an operation in the previous interval
|
int |
getPreviousIntervalNumOps()
The number of operations in the previous interval
|
void |
inc(int numOps,
long time)
Increment the metrics for numOps operations
|
void |
inc(long time)
Increment the metrics for one operation
|
void |
pushMetric(MetricsRecord mr)
Push the delta metrics to the mr.
|
void |
resetMinMax()
Reset the min max values
|
getDescription, getNamepublic MetricsTimeVaryingRate(String nam, MetricsRegistry registry, String description)
nam - the name of the metrics to be used to publish the metricregistry - - where the metrics object will be registeredpublic MetricsTimeVaryingRate(String nam, MetricsRegistry registry)
nam - the name of the metrics to be used to publish the metricregistry - - where the metrics object will be registered
A description of MetricsBase.NO_DESCRIPTION is usedpublic void inc(int numOps,
long time)
numOps - - number of operationstime - - time for numOps operationspublic void inc(long time)
time - for one operationpublic void pushMetric(MetricsRecord mr)
getPreviousIntervalAverageTime() and
getPreviousIntervalNumOps()pushMetric in class MetricsBasemr - public int getPreviousIntervalNumOps()
public long getPreviousIntervalAverageTime()
public long getMinTime()
resetMinMax()public long getMaxTime()
resetMinMax()public void resetMinMax()
Copyright © 2013 Apache Software Foundation. All rights reserved.