public static interface IStats.Counter
A IStats.Counter
is useful for recording an increasing value over time. Sampled
periodically it can be used to derive a rate. For example a counter could be used
to record a number of message received. By sampling it over time it can be used
to create a received message rate.
Modifier and Type | Method and Description |
---|---|
void |
compute()
Computes statistic values.
|
void |
get(StringBuilder builder,
NumberFormat format)
Appends the counter value and any computed stats calculated by
compute()
to the provided StringBuilder . |
long |
getCount()
Gets the current counter value.
|
String |
getName()
Gets statistic name.
|
XString |
getNameAsRaw()
Gets the stat's name as a
XString . |
void |
increment()
Increments the counter.
|
void |
increment(int count)
Increments the counter.
|
void |
reset()
Clears and resets the counter.
|
String getName()
XString getNameAsRaw()
XString
.void increment()
void increment(int count)
count
- The amount to increment (must be positive)long getCount()
void compute()
void get(StringBuilder builder, NumberFormat format)
compute()
to the provided StringBuilder
.void reset()
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.