public class MetricMutableStat extends MetricMutable
description, name
构造器和说明 |
---|
MetricMutableStat(String name,
String description,
String sampleName,
String valueName)
Construct a snapshot stat metric with extended stat off by default
|
MetricMutableStat(String name,
String description,
String sampleName,
String valueName,
boolean extended)
Construct a sample statistics metric
|
限定符和类型 | 方法和说明 |
---|---|
void |
add(long value)
Add a snapshot to the metric
|
void |
add(long numSamples,
long sum)
Add a number of samples and their sum to the running stat
|
void |
resetMinMax()
Reset the all time min max of the metric
|
void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot/snapshot of the metric
|
changed, clearChanged, setChanged, snapshot
public MetricMutableStat(String name, String description, String sampleName, String valueName, boolean extended)
name
- of the metricdescription
- of the metricsampleName
- of the metric (e.g. "ops")valueName
- of the metric (e.g. "time", "latency")extended
- create extended stats (stdev, min/max etc.) by default.public MetricMutableStat(String name, String description, String sampleName, String valueName)
name
- of the metricdescription
- of the metricsampleName
- of the metric (e.g. "ops")valueName
- of the metric (e.g. "time", "latency")public void add(long numSamples, long sum)
numSamples
- number of samplessum
- of the samplespublic void add(long value)
value
- of the metricpublic void snapshot(MetricsRecordBuilder builder, boolean all)
MetricMutable
snapshot
在类中 MetricMutable
builder
- the metrics record builderall
- if true, snapshot unchanged metrics as wellpublic void resetMinMax()
Copyright © 2009 The Apache Software Foundation