@Test public void testCounterFilter() throws Exception { MetricPoller poller = new JmxMetricPoller( new LocalJmxConnector(), new ObjectName("java.lang:type=OperatingSystem"), MATCH_ALL); boolean found = false; List<Metric> metrics = poller.poll(MATCH_ALL); for (Metric m : metrics) { if ("AvailableProcessors".equals(m.getConfig().getName())) { found = true; Map<String, String> tags = m.getConfig().getTags().asMap(); assertEquals(tags.get("JmxDomain"), "java.lang"); assertEquals(tags.get("Jmx.type"), "OperatingSystem"); assertEquals(tags.get("ClassName"), "com.netflix.servo.publish.JmxMetricPoller"); assertEquals(tags.get(DataSourceType.KEY), "COUNTER"); } } assertTrue(found); }
public List<Metric> poll(MetricFilter filter) { return poll(filter, false); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); List<Metric> poll(MetricFilter filter); List<Metric> poll(MetricFilter filter, boolean reset); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); List<Metric> poll(MetricFilter filter); List<Metric> poll(MetricFilter filter, boolean reset);  }