@Test(expected = IllegalArgumentException.class) public void testDuplicateMetricName() { metrics.sensor("test").add(new MetricName("test", "grp1"), new Avg()); metrics.sensor("test2").add(new MetricName("test", "grp1"), new Total()); }
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();  }