| Constructor and Description |
|---|
MultiLatencyStatAndMetric(int numBuckets)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,Map<T,Double>> |
getTimeLatAvg() |
Object |
getValueAndReset()
Get value and reset.
|
protected String |
keyToString(T key) |
void |
record(T key,
long latency)
Record a latency value.
|
public MultiLatencyStatAndMetric(int numBuckets)
Constructor.
numBuckets - the number of buckets to divide the time periods into.public void record(T key, long latency)
Record a latency value.
latency - the measurement to recordpublic Object getValueAndReset()
IMetricGet value and reset.
getValueAndReset in interface IMetricIMetricsConsumer#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 void close()
Copyright © 2019 The Apache Software Foundation. All rights reserved.