class GarbageCollectorMetricSet implements MetricSet {

    @Override
    public Map<String, Metric> getMetrics() {
        final Map<String, Metric> gauges = new HashMap<>();
        for (final GarbageCollectorMXBean gc : garbageCollectors) {
            final String name = WHITESPACE.matcher(gc.getName()).replaceAll("-");
            gauges.put(name(name, "count"), (Gauge<Long>) gc::getCollectionCount);
            gauges.put(name(name, "time"), (Gauge<Long>) gc::getCollectionTime);
        }
        return Collections.unmodifiableMap(gauges);
    }

    public  GarbageCollectorMetricSet();
    public  GarbageCollectorMetricSet(Collection<GarbageCollectorMXBean> garbageCollectors);

}