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