@InterfaceAudience.Private public class MutableHistogram extends org.apache.hadoop.metrics2.lib.MutableMetric implements MetricHistogram
Modifier and Type | Field and Description |
---|---|
protected String |
desc |
protected HistogramImpl |
histogram |
protected String |
name |
MAX_METRIC_NAME, MEAN_METRIC_NAME, MEDIAN_METRIC_NAME, MIN_METRIC_NAME, NINETIETH_PERCENTILE_METRIC_NAME, NINETY_EIGHTH_PERCENTILE_METRIC_NAME, NINETY_FIFTH_PERCENTILE_METRIC_NAME, NINETY_NINE_POINT_NINETH_PERCENTILE_METRIC_NAME, NINETY_NINETH_PERCENTILE_METRIC_NAME, NUM_OPS_METRIC_NAME, SEVENTY_FIFTH_PERCENTILE_METRIC_NAME, TWENTY_FIFTH_PERCENTILE_METRIC_NAME
Constructor and Description |
---|
MutableHistogram(org.apache.hadoop.metrics2.MetricsInfo info) |
MutableHistogram(String name,
String description) |
Modifier and Type | Method and Description |
---|---|
void |
add(long val)
Add a single value to a histogram's stream of values.
|
long |
getCount()
Return the total number of values added to the histogram.
|
long |
getMax() |
void |
snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder,
boolean all) |
static void |
snapshot(String name,
String desc,
Histogram histogram,
org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder,
boolean all) |
protected static void |
updateSnapshotMetrics(String name,
String desc,
Histogram histogram,
Snapshot snapshot,
org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder) |
protected HistogramImpl histogram
public MutableHistogram(org.apache.hadoop.metrics2.MetricsInfo info)
public MutableHistogram(String name, String description)
public void add(long val)
MetricHistogram
add
in interface MetricHistogram
public long getCount()
MetricHistogram
getCount
in interface MetricHistogram
public long getMax()
public void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
snapshot
in class org.apache.hadoop.metrics2.lib.MutableMetric
public static void snapshot(String name, String desc, Histogram histogram, org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
protected static void updateSnapshotMetrics(String name, String desc, Histogram histogram, Snapshot snapshot, org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.