@Test public void testByStrings() throws Exception { clock.set(1L); DynamicCounter.increment("byName"); DynamicCounter.increment("byName"); StepCounter c = getByName("byName"); clock.set(60001L); assert c != null; assertEquals(c.getCount(0), 2L); DynamicCounter.increment("byName2", "key", "value", "key2", "value2"); DynamicCounter.increment("byName2", "key", "value", "key2", "value2"); StepCounter c2 = getByName("byName2"); clock.set(120001L); assert c2 != null; assertEquals(c2.getCount(0), 2L); }
public static void increment(MonitorConfig config) { INSTANCE.get(config).increment(); }
DynamicCounter extends AbstractMonitor<Long> implements CompositeMonitor<Long>, SpectatorMonitor { public static void increment(MonitorConfig config) { INSTANCE.get(config).increment(); } }
DynamicCounter extends AbstractMonitor<Long> implements CompositeMonitor<Long>, SpectatorMonitor { public static void increment(MonitorConfig config) { INSTANCE.get(config).increment(); } private  DynamicCounter(); }
DynamicCounter extends AbstractMonitor<Long> implements CompositeMonitor<Long>, SpectatorMonitor { public static void increment(MonitorConfig config) { INSTANCE.get(config).increment(); } private  DynamicCounter(); @Override void initializeSpectator(TagList tags); static void increment(MonitorConfig config); static void increment(String name, String... tags); static void increment(MonitorConfig config, long delta); static void increment(String name, TagList list); static void increment(String name, TagList list, long delta); @Override @SuppressWarnings("unchecked") List<Monitor<?>> getMonitors(); @Override Long getValue(int pollerIndex); @Override String toString(); }
DynamicCounter extends AbstractMonitor<Long> implements CompositeMonitor<Long>, SpectatorMonitor { public static void increment(MonitorConfig config) { INSTANCE.get(config).increment(); } private  DynamicCounter(); @Override void initializeSpectator(TagList tags); static void increment(MonitorConfig config); static void increment(String name, String... tags); static void increment(MonitorConfig config, long delta); static void increment(String name, TagList list); static void increment(String name, TagList list, long delta); @Override @SuppressWarnings("unchecked") List<Monitor<?>> getMonitors(); @Override Long getValue(int pollerIndex); @Override String toString();  }