Constructor and Description |
---|
LatencyStatAndMetric(int numBuckets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,Double> |
getTimeLatAvg()
Get time latency average.
|
Object |
getValueAndReset()
Get value and reset.
|
void |
record(long latency)
Record a specific latency.
|
public LatencyStatAndMetric(int numBuckets)
Constructor.
numBuckets
- the number of buckets to divide the time periods into.public void record(long latency)
Record a specific latency.
latency
- what we are recordingpublic Object getValueAndReset()
IMetric
Get value and reset.
getValueAndReset
in interface IMetric
IMetricsConsumer#handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer
.TaskInfo,
java.util.Collection)
. If null is returned nothing will be sent. If this value can be reset, like with a counter, a side effect of calling this should be that the value is reset.public Map<String,Double> getTimeLatAvg()
Get time latency average.
public void close()
Copyright © 2019 The Apache Software Foundation. All rights reserved.