public class WindowedSum extends SampledStat
SampledStat
that maintains the sum of what it has seen.
This is a sampled version of CumulativeSum
.
See also WindowedCount
if you want to increment the value by 1 on each recording.SampledStat.Sample
samples
Constructor and Description |
---|
WindowedSum() |
Modifier and Type | Method and Description |
---|---|
double |
combine(java.util.List<SampledStat.Sample> samples,
MetricConfig config,
long now) |
protected void |
update(SampledStat.Sample sample,
MetricConfig config,
double value,
long now) |
current, measure, newSample, oldest, purgeObsoleteSamples, record
protected void update(SampledStat.Sample sample, MetricConfig config, double value, long now)
update
in class SampledStat
public double combine(java.util.List<SampledStat.Sample> samples, MetricConfig config, long now)
combine
in class SampledStat