public MetricSet partialClone() {
        return new MetricSet(
                data.entrySet().stream()
                .filter(kv -> kv.getValue() instanceof GaugeMetric)
                .collect(Collectors.toMap(
                        kv -> kv.getKey(),
                        kv -> ((GaugeMetric)kv.getValue()).newWithPreservedLastValue())));
    }
Create and return a MetricSet which carries over the last values
set for gauges in the this MetricSet. Aggregate metrics are currently
not carried over and will not be present in the returned set.
container-core/src/main/java/com/yahoo/container/jdisc/state/MetricSet.java