public class SamplingCounter extends Counter
Constructor and Description |
---|
SamplingCounter(String category,
String name,
com.google.common.collect.ImmutableMap<String,String> tags) |
Modifier and Type | Method and Description |
---|---|
void |
addSample(long value) |
Optional<CounterSnapshot> |
flush()
If the counter has no data, returns an absent value.
|
long |
getAverage() |
long |
getCount() |
long |
getMax() |
long |
getMin() |
public long getMin()
public long getMax()
public long getAverage()
public void addSample(long value)
public Optional<CounterSnapshot> flush()
Counter
Otherwise, creates a snapshot of the current internal state of the counter builder, resets the counter, then returns the snapshot.
public long getCount()