public class LatencyStat extends Object
Keeps track of approximate latency for the last 10 mins, 3 hours, 1 day, and all time.
Constructor and Description |
---|
LatencyStat(int numBuckets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,Double> |
getTimeLatAvg()
Get time latency average.
|
void |
record(long latency)
Record a specific latency.
|
public LatencyStat(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 Map<String,Double> getTimeLatAvg()
Get time latency average.
public void close()
Copyright © 2022 The Apache Software Foundation. All rights reserved.