@Test public void pollsPeriodically() throws Exception { Thread.sleep(500); verify(reporter, times(2)).report( map("gauge", gauge), map("counter", counter), map("histogram", histogram), map("meter", meter), map("timer", timer) ); }
public void report() { synchronized (this) { report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter)); } }
ScheduledReporter implements Closeable { public void report() { synchronized (this) { report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter)); } } }
ScheduledReporter implements Closeable { public void report() { synchronized (this) { report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter)); } } protected  ScheduledReporter(MetricRegistry registry,
                                String name,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit); protected  ScheduledReporter(MetricRegistry registry,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit,
                                ScheduledExecutorService executor); }
ScheduledReporter implements Closeable { public void report() { synchronized (this) { report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter)); } } protected  ScheduledReporter(MetricRegistry registry,
                                String name,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit); protected  ScheduledReporter(MetricRegistry registry,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit,
                                ScheduledExecutorService executor); void start(long period, TimeUnit unit); void stop(); @Override void close(); void report(); abstract void report(SortedMap<MetricName, Gauge> gauges,
                                SortedMap<MetricName, Counter> counters,
                                SortedMap<MetricName, Histogram> histograms,
                                SortedMap<MetricName, Meter> meters,
                                SortedMap<MetricName, Timer> timers); }
ScheduledReporter implements Closeable { public void report() { synchronized (this) { report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter)); } } protected  ScheduledReporter(MetricRegistry registry,
                                String name,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit); protected  ScheduledReporter(MetricRegistry registry,
                                MetricFilter filter,
                                TimeUnit rateUnit,
                                TimeUnit durationUnit,
                                ScheduledExecutorService executor); void start(long period, TimeUnit unit); void stop(); @Override void close(); void report(); abstract void report(SortedMap<MetricName, Gauge> gauges,
                                SortedMap<MetricName, Counter> counters,
                                SortedMap<MetricName, Histogram> histograms,
                                SortedMap<MetricName, Meter> meters,
                                SortedMap<MetricName, Timer> timers);  }