@Override
    public List<NamedMeasurable> stats() {
        List<NamedMeasurable> ms = new ArrayList<>(frequencies.length);
        for (Frequency frequency : frequencies) {
            final double center = frequency.centerValue();
            ms.add(new NamedMeasurable(frequency.name(), (config, now) -> frequency(config, now, center)));
        }
        return ms;
    }
Create a Frequencies that captures the values in the specified range into the given number of buckets,
where the buckets are centered around the minimum, maximum, and intermediate values.

@param buckets     the number of buckets; must be at least 1
@param min         the minimum value to be captured
@param max         the maximum value to be captured
@param frequencies the list of {@link Frequency} metrics, which at most should be one per bucket centered
                   on the bucket's value, though not every bucket need to correspond to a metric if the
                   value is not needed
@throws IllegalArgumentException if any of the {@link Frequency} objects do not have a
                                 {@link Frequency#centerValue() center value} within the specified range
clients/src/main/java/org/apache/kafka/common/metrics/stats/Frequencies.java