DropWizardMetricRegistry implements VertexiumMetricRegistry { static Duration parseDuration(String period) { period = period.trim(); try { return Duration.parse(period.toUpperCase()); } catch (Exception ex) { return Duration.parse("PT" + period.toUpperCase()); } } DropWizardMetricRegistry();  DropWizardMetricRegistry(MetricRegistry metricRegistry); MetricRegistry getMetricRegistry(); void startConsoleReporter(long periodMillis); void startConsoleReporter(long period, TimeUnit timeUnit); void stopConsoleReporter(); boolean isConsoleReporterStarted(); @Override String createName(Class clazz, String... nameParts); @Override Counter getCounter(String name); @Override Iterable<Counter> getCounters(); @Override Timer getTimer(String name); @Override Iterable<Timer> getTimers(); @Override Histogram getHistogram(String name); @Override Iterable<Histogram> getHistograms(); @Override @SuppressWarnings("unchecked") Gauge<T> getGauge(String name, Supplier<T> supplier); @Override Iterable<Gauge> getGauges(); @Override StackTraceTracker getStackTraceTracker(String name); @Override Iterable<? extends StackTraceTracker> getStackTraceTrackers(); @Override void shutdown();  }
@Test public void testParse() { assertEquals(5000, DropWizardMetricRegistry.parseDuration("5s").toMillis()); assertEquals(60 * 1000, DropWizardMetricRegistry.parseDuration("1m").toMillis()); }