Class ExponentialWeightedAvg

All Implemented Interfaces:
Measurable, MeasurableStat, MetricValueProvider<Double>, Stat

public class ExponentialWeightedAvg extends Avg
A SampledStat that maintains an exponentially weighted average over its samples. This is the same as an Exponential Moving Average for a fixed sample set
  • Constructor Details

    • ExponentialWeightedAvg

      public ExponentialWeightedAvg(double alpha)
  • Method Details

    • combine

      public double combine(List<org.apache.kafka.common.metrics.stats.SampledStat.Sample> samples, MetricConfig config, long now)
      Overrides:
      combine in class Avg