@Test(expected = IllegalArgumentException.class) public void testBadSensorHiearchy() { Sensor p = metrics.sensor("parent"); Sensor c1 = metrics.sensor("child1", p); Sensor c2 = metrics.sensor("child2", p); metrics.sensor("gc", c1, c2); }
public Sensor sensor(String name) { return sensor(name, null, (Sensor[]) null); }
Metrics { public Sensor sensor(String name) { return sensor(name, null, (Sensor[]) null); } }
Metrics { public Sensor sensor(String name) { return sensor(name, null, (Sensor[]) null); } Metrics();  Metrics(Time time);  Metrics(MetricConfig defaultConfig);  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time); }
Metrics { public Sensor sensor(String name) { return sensor(name, null, (Sensor[]) null); } Metrics();  Metrics(Time time);  Metrics(MetricConfig defaultConfig);  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time); Sensor getSensor(String name); Sensor sensor(String name); Sensor sensor(String name, Sensor... parents); synchronized Sensor sensor(String name, MetricConfig config, Sensor... parents); void addMetric(MetricName metricName, Measurable measurable); synchronized void addMetric(MetricName metricName, MetricConfig config, Measurable
      measurable); synchronized void addReporter(MetricsReporter reporter); Map<MetricName, KafkaMetric> metrics(); void close(); }
Metrics { public Sensor sensor(String name) { return sensor(name, null, (Sensor[]) null); } Metrics();  Metrics(Time time);  Metrics(MetricConfig defaultConfig);  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time); Sensor getSensor(String name); Sensor sensor(String name); Sensor sensor(String name, Sensor... parents); synchronized Sensor sensor(String name, MetricConfig config, Sensor... parents); void addMetric(MetricName metricName, Measurable measurable); synchronized void addMetric(MetricName metricName, MetricConfig config, Measurable
      measurable); synchronized void addReporter(MetricsReporter reporter); Map<MetricName, KafkaMetric> metrics(); void close();  }