@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) public class MetricsTimeVaryingLong extends MetricsBase
MetricsTimeVaryingRate
NO_DESCRIPTION
Constructor and Description |
---|
MetricsTimeVaryingLong(String nam,
MetricsRegistry registry)
Constructor - create a new metric
|
MetricsTimeVaryingLong(String nam,
MetricsRegistry registry,
String description)
Constructor - create a new metric
|
Modifier and Type | Method and Description |
---|---|
long |
getCurrentIntervalValue()
The Value at the current interval
|
long |
getPreviousIntervalValue()
The Value at the Previous interval
|
void |
inc()
Inc metrics by one
|
void |
inc(long incr)
Inc metrics for incr vlaue
|
void |
pushMetric(MetricsRecord mr)
Push the delta metrics to the mr.
|
getDescription, getName
public MetricsTimeVaryingLong(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 MetricsTimeVaryingLong(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(long incr)
incr
- - number of operationspublic void inc()
public void pushMetric(MetricsRecord mr)
previousIntervalValue
pushMetric
in class MetricsBase
mr
- public long getPreviousIntervalValue()
public long getCurrentIntervalValue()
Copyright © 2013 Apache Software Foundation. All rights reserved.