@Test public void testMeter() throws InterruptedException { Metrics.startSlf4jReporter(1, TimeUnit.SECONDS); Meter requests = Metrics.meter(name(MetricsTest.class, "request")); for (int i = 0; i < 5; i++) { requests.mark(); TimeUnit.SECONDS.sleep(1); } }
public static Meter meter(String name) { return metrics.meter(name); }
Metrics { public static Meter meter(String name) { return metrics.meter(name); } }
Metrics { public static Meter meter(String name) { return metrics.meter(name); }  }
Metrics { public static Meter meter(String name) { return metrics.meter(name); }  static void startMicroscopeReporter(); static void startMicroscopeReporter(long period, TimeUnit unit); static void startSlf4jReporter(); static void startSlf4jReporter(long period, TimeUnit unit); static void startConsoleReporter(); static void startConsoleReporter(long period, TimeUnit unit); static void startCsvReporter(); static void startCsvReporter(long period, TimeUnit unit); static void startJmxReporter(); static void startGraphiteReporter(); static void startGraphiteReporter(long period, TimeUnit unit); static void startGangliaReporter(); static void startGangliaReporter(long period, TimeUnit unit); static void registerJVM(); static Metric register(String name, T metric); void registerAll(MetricSet metricset); static Counter counter(String name); static void inc(String name); static void inc(String name, long n); static void dec(String name); static void dec(String name, long n); static Histogram histogram(String name); static Meter meter(String name); static Timer timer(String name); boolean remove(String name); void removeMatching(MetricFilter filter); void addListener(MetricRegistryListener listener); void removeListener(MetricRegistryListener listener); SortedSet<String> getNames(); SortedMap<String, Gauge> getGauges(); SortedMap<String, Gauge> getGauges(MetricFilter filter); SortedMap<String, Counter> getCounters(); SortedMap<String, Counter> getCounters(MetricFilter filter); SortedMap<String, Histogram> getHistograms(); SortedMap<String, Histogram> getHistograms(MetricFilter filter); SortedMap<String, Meter> getMeters(); SortedMap<String, Meter> getMeters(MetricFilter filter); SortedMap<String, Timer> getTimers(); SortedMap<String, Timer> getTimers(MetricFilter filter); static void register(String name, HealthCheck healthCheck); static void unregister(String name); static SortedSet<String> getHealthNames(); static HealthCheck.Result runHealthCheck(String name); static SortedMap<String, HealthCheck.Result> runHealthChecks(); static SortedMap<String, HealthCheck.Result> runHealthChecks(ExecutorService executor); }
Metrics { public static Meter meter(String name) { return metrics.meter(name); }  static void startMicroscopeReporter(); static void startMicroscopeReporter(long period, TimeUnit unit); static void startSlf4jReporter(); static void startSlf4jReporter(long period, TimeUnit unit); static void startConsoleReporter(); static void startConsoleReporter(long period, TimeUnit unit); static void startCsvReporter(); static void startCsvReporter(long period, TimeUnit unit); static void startJmxReporter(); static void startGraphiteReporter(); static void startGraphiteReporter(long period, TimeUnit unit); static void startGangliaReporter(); static void startGangliaReporter(long period, TimeUnit unit); static void registerJVM(); static Metric register(String name, T metric); void registerAll(MetricSet metricset); static Counter counter(String name); static void inc(String name); static void inc(String name, long n); static void dec(String name); static void dec(String name, long n); static Histogram histogram(String name); static Meter meter(String name); static Timer timer(String name); boolean remove(String name); void removeMatching(MetricFilter filter); void addListener(MetricRegistryListener listener); void removeListener(MetricRegistryListener listener); SortedSet<String> getNames(); SortedMap<String, Gauge> getGauges(); SortedMap<String, Gauge> getGauges(MetricFilter filter); SortedMap<String, Counter> getCounters(); SortedMap<String, Counter> getCounters(MetricFilter filter); SortedMap<String, Histogram> getHistograms(); SortedMap<String, Histogram> getHistograms(MetricFilter filter); SortedMap<String, Meter> getMeters(); SortedMap<String, Meter> getMeters(MetricFilter filter); SortedMap<String, Timer> getTimers(); SortedMap<String, Timer> getTimers(MetricFilter filter); static void register(String name, HealthCheck healthCheck); static void unregister(String name); static SortedSet<String> getHealthNames(); static HealthCheck.Result runHealthCheck(String name); static SortedMap<String, HealthCheck.Result> runHealthChecks(); static SortedMap<String, HealthCheck.Result> runHealthChecks(ExecutorService executor);  }