@Override
    protected void update(Sample sample, MetricConfig config, double value, long now) {
        sample.value = Math.max(sample.value, value);
    }
A {@link SampledStat} that gives the max over its samples.
clients/src/main/java/org/apache/kafka/common/metrics/stats/Max.java