DropWizardMetricsRegistry extends MetricRegistry { @Override public DistributionSummary distributionSummary(Id id) { if (overSize(id)) { return NoopRegistry.INSTANCE.distributionSummary(id); } final String name = toMetricName(id); return new DwMetricsDistributionSummary(clock(), id, impl.histogram(name)); } DropWizardMetricsRegistry();  DropWizardMetricsRegistry(Clock clock, com.codahale.metrics.MetricRegistry impl);  DropWizardMetricsRegistry(Clock clock, com.codahale.metrics.MetricRegistry impl,
                                     MetricConfig metricConfig); @Override Gauge<T> gauge(Id id, Gauge<T> gauge); @Override Counter counter(Id id); @Override DistributionSummary distributionSummary(Id id); @Override Timer timer(Id id); @Override void register(final Metric metric); @Override void removeMetric(Id id); @Override void propagate(String msg, Throwable t); @Override MixinMetric mixinMetric(Id id); @Override void registerExtendedMetrics(); @Override Info info(Id id, Y info); @Override X get(Id id); @Override Iterator<Metric> iterator(); boolean overSize(Id id);  }
@Test public void testDropwizardDs() { MetricRegistry reg = new MetricRegistry(); DropWizardMetricsRegistry dwreg = new DropWizardMetricsRegistry(Clock.SYSTEM, reg); DistributionSummary ds = dwreg.distributionSummary(dwreg.createId("a.b.c")); ds.record(3); ds.record(3); Histogram histogram = reg.histogram("a.b.c"); System.out.println(histogram.getCount()); Assert.assertEquals(2, histogram.getCount()); }