public class WindowedCount extends WindowedSum
SampledStat
that maintains a simple count of what it has seen.
This is a special kind of WindowedSum
that always records a value of 1
instead of the provided value.
In other words, it counts the number of
SampledStat.record(MetricConfig, double, long)
invocations,
instead of summing the recorded values.
See also CumulativeCount
for a non-sampled version of this metric.SampledStat.Sample
samples
Constructor and Description |
---|
WindowedCount() |
Modifier and Type | Method and Description |
---|---|
protected void |
update(SampledStat.Sample sample,
MetricConfig config,
double value,
long now) |
combine
current, measure, newSample, oldest, purgeObsoleteSamples, record, toString
protected void update(SampledStat.Sample sample, MetricConfig config, double value, long now)
update
in class WindowedSum