Package org.eclipse.jetty.util.statistic
Class RateCounter
- java.lang.Object
-
- org.eclipse.jetty.util.statistic.RateCounter
-
public class RateCounter extends java.lang.Object
Counts the rate thatLong
s are added to this from the time of creation or the last call toreset()
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicLong
_timeStamp
private java.util.concurrent.atomic.LongAdder
_total
-
Constructor Summary
Constructors Constructor Description RateCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long l)
long
getRate()
void
reset()
-