@Test public void testTabularData() throws Exception { MapMXBean mapMXBean = new MapMXBean(); try { MetricPoller poller = new JmxMetricPoller( new LocalJmxConnector(), new ObjectName("com.netflix.servo.test:*"), MATCH_ALL); List<Metric> metrics = poller.poll(config -> config.getName().equals("Count")); assertEquals(metrics.size(), 2); Map<String, Integer> values = new HashMap<>(); for (Metric m : metrics) { values.put(m.getConfig().getTags().getTag("JmxCompositePath").getValue(), (Integer) m.getValue()); } assertEquals(values.get("Entry1"), (Integer) 111); assertEquals(values.get("Entry2"), (Integer) 222); } finally { mapMXBean.destroy(); } }
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);  }