@InterfaceAudience.Private public class MetricMutableQuantiles extends MutableMetric implements MetricHistogram
Modifier and Type | Field and Description |
---|---|
protected Map<MetricQuantile,Long> |
previousSnapshot |
MAX_METRIC_NAME, MEAN_METRIC_NAME, MEDIAN_METRIC_NAME, MIN_METRIC_NAME, NINETY_FIFTH_PERCENTILE_METRIC_NAME, NINETY_NINETH_PERCENTILE_METRIC_NAME, NUM_OPS_METRIC_NAME, SEVENTY_FIFTH_PERCENTILE_METRIC_NAME
Constructor and Description |
---|
MetricMutableQuantiles(String name,
String description,
String sampleName,
String valueName,
int interval)
Instantiates a new
MetricMutableQuantiles for a metric that rolls itself over on the
specified time interval. |
Modifier and Type | Method and Description |
---|---|
void |
add(long value)
Add a single value to a histogram's stream of values.
|
int |
getInterval() |
void |
snapshot(MetricsRecordBuilder builder,
boolean all) |
protected Map<MetricQuantile,Long> previousSnapshot
public MetricMutableQuantiles(String name, String description, String sampleName, String valueName, int interval)
MetricMutableQuantiles
for a metric that rolls itself over on the
specified time interval.name
- of the metricdescription
- long-form textual description of the metricsampleName
- type of items in the stream (e.g., "Ops")valueName
- type of the valuesinterval
- rollover interval (in seconds) of the estimatorpublic void snapshot(MetricsRecordBuilder builder, boolean all)
public void add(long value)
MetricHistogram
add
in interface MetricHistogram
public int getInterval()