@Test public void testGetTimer() { Timer a = metrics.getTimer(MetricsFactoryTest.class, "a"); assertNotNull(a); assertSame(a, metrics.getTimer(MetricsFactoryTest.class, "a")); assertNotEquals(a, metrics.getTimer(MetricsFactoryTest.class, "b")); Timer b = metrics.getTimer(MetricsFactoryTest.class.getCanonicalName(), "b"); assertNotNull(b); assertSame(b, metrics.getTimer(MetricsFactoryTest.class.getCanonicalName(), "b")); assertNotEquals(b, metrics.getTimer(MetricsFactoryTest.class.getCanonicalName(), "c")); }
public Timer getTimer(Class<?> clazz, String name) { return metricRegistry.timer(makeName(clazz, name)); }
MetricsFactory implements BaleenComponent { public Timer getTimer(Class<?> clazz, String name) { return metricRegistry.timer(makeName(clazz, name)); } }
MetricsFactory implements BaleenComponent { public Timer getTimer(Class<?> clazz, String name) { return metricRegistry.timer(makeName(clazz, name)); } MetricsFactory();   MetricsFactory(MetricRegistry registry); }
MetricsFactory implements BaleenComponent { public Timer getTimer(Class<?> clazz, String name) { return metricRegistry.timer(makeName(clazz, name)); } MetricsFactory();   MetricsFactory(MetricRegistry registry); static MetricsFactory getInstance(); static Metrics getMetrics(String prefix, Class<?> clazz); static Metrics getMetrics(Class<?> clazz); PipelineMetrics getPipelineMetrics(String pipelineName); @Override void configure(Configuration configuration); MetricRegistry getRegistry(); Counter getCounter(Class<?> clazz, String name); Meter getMeter(Class<?> clazz, String name); Histogram getHistogram(Class<?> clazz, String name); Timer getTimer(Class<?> clazz, String name); Counter getCounter(String base, String name); Meter getMeter(String base, String name); Histogram getHistogram(String base, String name); Timer getTimer(String base, String name); String makeName(String base, String name); String makeName(Class<?> clazz, String name); @Override void start(); @Override void stop(); void removeAll(); void report(); }
MetricsFactory implements BaleenComponent { public Timer getTimer(Class<?> clazz, String name) { return metricRegistry.timer(makeName(clazz, name)); } MetricsFactory();   MetricsFactory(MetricRegistry registry); static MetricsFactory getInstance(); static Metrics getMetrics(String prefix, Class<?> clazz); static Metrics getMetrics(Class<?> clazz); PipelineMetrics getPipelineMetrics(String pipelineName); @Override void configure(Configuration configuration); MetricRegistry getRegistry(); Counter getCounter(Class<?> clazz, String name); Meter getMeter(Class<?> clazz, String name); Histogram getHistogram(Class<?> clazz, String name); Timer getTimer(Class<?> clazz, String name); Counter getCounter(String base, String name); Meter getMeter(String base, String name); Histogram getHistogram(String base, String name); Timer getTimer(String base, String name); String makeName(String base, String name); String makeName(Class<?> clazz, String name); @Override void start(); @Override void stop(); void removeAll(); void report();  }