test_class.declarator: EPS = 0.000001
test_class.modifier: private static final
test_class.original_string: private static final double EPS = 0.000001;
test_class.type: double
test_class.var_name: EPS
test_class.declarator: time = new MockTime()
test_class.modifier: private
test_class.original_string: private MockTime time = new MockTime();
test_class.type: MockTime
test_class.var_name: time
test_class.declarator: config = new MetricConfig()
test_class.modifier: private
test_class.original_string: private MetricConfig config = new MetricConfig();
test_class.type: MetricConfig
test_class.var_name: config
test_class.declarator: metrics
test_class.modifier: private
test_class.original_string: private Metrics metrics;
test_class.type: Metrics
test_class.var_name: metrics
test_class.file: clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java
test_class.identifier: MetricsTest
test_case.body: @Test
      public void testMetricName() {
          MetricName n1 = metrics.metricName("name", "group", "description", "key1", "value1", "key2", "value2");
          Map<String, String> tags = new HashMap<String, String>();
          tags.put("key1", "value1");
          tags.put("key2", "value2");
          MetricName n2 = metrics.metricName("name", "group", "description", tags);
          assertEquals("metric names created in two different ways should be equal", n1, n2);
  
          try {
              metrics.metricName("name", "group", "description", "key1");
              fail("Creating MetricName with an odd number of keyValue should fail");
          } catch (IllegalArgumentException e) {
              // this is expected
          }
      }
test_case.class_method_signature: MetricsTest.testMetricName()
test_case.full_signature: @Test public void testMetricName()
test_case.identifier: testMetricName
test_case.invocations: metricName put put metricName assertEquals metricName fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMetricName()
focal_class.declarator: config
focal_class.modifier: private final
focal_class.original_string: private final MetricConfig config;
focal_class.type: MetricConfig
focal_class.var_name: config
focal_class.declarator: metrics
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<MetricName, KafkaMetric> metrics;
focal_class.type: ConcurrentMap<MetricName, KafkaMetric>
focal_class.var_name: metrics
focal_class.declarator: sensors
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<String, Sensor> sensors;
focal_class.type: ConcurrentMap<String, Sensor>
focal_class.var_name: sensors
focal_class.declarator: childrenSensors
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<Sensor, List<Sensor>> childrenSensors;
focal_class.type: ConcurrentMap<Sensor, List<Sensor>>
focal_class.var_name: childrenSensors
focal_class.declarator: reporters
focal_class.modifier: private final
focal_class.original_string: private final List<MetricsReporter> reporters;
focal_class.type: List<MetricsReporter>
focal_class.var_name: reporters
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Time time;
focal_class.type: Time
focal_class.var_name: time
focal_class.declarator: metricsScheduler
focal_class.modifier: private final
focal_class.original_string: private final ScheduledThreadPoolExecutor metricsScheduler;
focal_class.type: ScheduledThreadPoolExecutor
focal_class.var_name: metricsScheduler
focal_class.declarator: log = LoggerFactory.getLogger(Metrics.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(Metrics.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java
focal_class.identifier: Metrics
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: Metrics.Metrics()
focal_class.full_signature: public  Metrics()
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Metrics()
focal_class.class_method_signature: Metrics.Metrics(Time time)
focal_class.full_signature: public  Metrics(Time time)
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: (Time time)
focal_class.signature:  Metrics(Time time)
focal_class.class_method_signature: Metrics.Metrics(MetricConfig defaultConfig, Time time)
focal_class.full_signature: public  Metrics(MetricConfig defaultConfig, Time time)
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: (MetricConfig defaultConfig, Time time)
focal_class.signature:  Metrics(MetricConfig defaultConfig, Time time)
focal_class.class_method_signature: Metrics.Metrics(MetricConfig defaultConfig)
focal_class.full_signature: public  Metrics(MetricConfig defaultConfig)
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: (MetricConfig defaultConfig)
focal_class.signature:  Metrics(MetricConfig defaultConfig)
focal_class.class_method_signature: Metrics.Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time)
focal_class.full_signature: public  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time)
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: (MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time)
focal_class.signature:  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time)
focal_class.class_method_signature: Metrics.Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time, boolean enableExpiration)
focal_class.full_signature: public  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time, boolean enableExpiration)
focal_class.identifier: Metrics
focal_class.modifiers: public
focal_class.parameters: (MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time, boolean enableExpiration)
focal_class.signature:  Metrics(MetricConfig defaultConfig, List<MetricsReporter> reporters, Time time, boolean enableExpiration)
focal_class.class_method_signature: Metrics.metricName(String name, String group, String description, Map<String, String> tags)
focal_class.full_signature: public MetricName metricName(String name, String group, String description, Map<String, String> tags)
focal_class.identifier: metricName
focal_class.modifiers: public
focal_class.parameters: (String name, String group, String description, Map<String, String> tags)
focal_class.return: MetricName
focal_class.signature: MetricName metricName(String name, String group, String description, Map<String, String> tags)
focal_class.class_method_signature: Metrics.metricName(String name, String group, String description)
focal_class.full_signature: public MetricName metricName(String name, String group, String description)
focal_class.identifier: metricName
focal_class.modifiers: public
focal_class.parameters: (String name, String group, String description)
focal_class.return: MetricName
focal_class.signature: MetricName metricName(String name, String group, String description)
focal_class.class_method_signature: Metrics.metricName(String name, String group)
focal_class.full_signature: public MetricName metricName(String name, String group)
focal_class.identifier: metricName
focal_class.modifiers: public
focal_class.parameters: (String name, String group)
focal_class.return: MetricName
focal_class.signature: MetricName metricName(String name, String group)
focal_class.class_method_signature: Metrics.metricName(String name, String group, String description, String... keyValue)
focal_class.full_signature: public MetricName metricName(String name, String group, String description, String... keyValue)
focal_class.identifier: metricName
focal_class.modifiers: public
focal_class.parameters: (String name, String group, String description, String... keyValue)
focal_class.return: MetricName
focal_class.signature: MetricName metricName(String name, String group, String description, String... keyValue)
focal_class.class_method_signature: Metrics.metricName(String name, String group, Map<String, String> tags)
focal_class.full_signature: public MetricName metricName(String name, String group, Map<String, String> tags)
focal_class.identifier: metricName
focal_class.modifiers: public
focal_class.parameters: (String name, String group, Map<String, String> tags)
focal_class.return: MetricName
focal_class.signature: MetricName metricName(String name, String group, Map<String, String> tags)
focal_class.class_method_signature: Metrics.getTags(String... keyValue)
focal_class.full_signature: private static Map<String, String> getTags(String... keyValue)
focal_class.identifier: getTags
focal_class.modifiers: private static
focal_class.parameters: (String... keyValue)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getTags(String... keyValue)
focal_class.class_method_signature: Metrics.config()
focal_class.full_signature: public MetricConfig config()
focal_class.identifier: config
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: MetricConfig
focal_class.signature: MetricConfig config()
focal_class.class_method_signature: Metrics.getSensor(String name)
focal_class.full_signature: public Sensor getSensor(String name)
focal_class.identifier: getSensor
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: Sensor
focal_class.signature: Sensor getSensor(String name)
focal_class.class_method_signature: Metrics.sensor(String name)
focal_class.full_signature: public Sensor sensor(String name)
focal_class.identifier: sensor
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: Sensor
focal_class.signature: Sensor sensor(String name)
focal_class.class_method_signature: Metrics.sensor(String name, Sensor... parents)
focal_class.full_signature: public Sensor sensor(String name, Sensor... parents)
focal_class.identifier: sensor
focal_class.modifiers: public
focal_class.parameters: (String name, Sensor... parents)
focal_class.return: Sensor
focal_class.signature: Sensor sensor(String name, Sensor... parents)
focal_class.class_method_signature: Metrics.sensor(String name, MetricConfig config, Sensor... parents)
focal_class.full_signature: public synchronized Sensor sensor(String name, MetricConfig config, Sensor... parents)
focal_class.identifier: sensor
focal_class.modifiers: public synchronized
focal_class.parameters: (String name, MetricConfig config, Sensor... parents)
focal_class.return: Sensor
focal_class.signature: Sensor sensor(String name, MetricConfig config, Sensor... parents)
focal_class.class_method_signature: Metrics.sensor(String name, MetricConfig config, long inactiveSensorExpirationTimeSeconds, Sensor... parents)
focal_class.full_signature: public synchronized Sensor sensor(String name, MetricConfig config, long inactiveSensorExpirationTimeSeconds, Sensor... parents)
focal_class.identifier: sensor
focal_class.modifiers: public synchronized
focal_class.parameters: (String name, MetricConfig config, long inactiveSensorExpirationTimeSeconds, Sensor... parents)
focal_class.return: Sensor
focal_class.signature: Sensor sensor(String name, MetricConfig config, long inactiveSensorExpirationTimeSeconds, Sensor... parents)
focal_class.class_method_signature: Metrics.removeSensor(String name)
focal_class.full_signature: public void removeSensor(String name)
focal_class.identifier: removeSensor
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: void
focal_class.signature: void removeSensor(String name)
focal_class.class_method_signature: Metrics.addMetric(MetricName metricName, Measurable measurable)
focal_class.full_signature: public void addMetric(MetricName metricName, Measurable measurable)
focal_class.identifier: addMetric
focal_class.modifiers: public
focal_class.parameters: (MetricName metricName, Measurable measurable)
focal_class.return: void
focal_class.signature: void addMetric(MetricName metricName, Measurable measurable)
focal_class.class_method_signature: Metrics.addMetric(MetricName metricName, MetricConfig config, Measurable measurable)
focal_class.full_signature: public synchronized void addMetric(MetricName metricName, MetricConfig config, Measurable measurable)
focal_class.identifier: addMetric
focal_class.modifiers: public synchronized
focal_class.parameters: (MetricName metricName, MetricConfig config, Measurable measurable)
focal_class.return: void
focal_class.signature: void addMetric(MetricName metricName, MetricConfig config, Measurable measurable)
focal_class.class_method_signature: Metrics.removeMetric(MetricName metricName)
focal_class.full_signature: public synchronized KafkaMetric removeMetric(MetricName metricName)
focal_class.identifier: removeMetric
focal_class.modifiers: public synchronized
focal_class.parameters: (MetricName metricName)
focal_class.return: KafkaMetric
focal_class.signature: KafkaMetric removeMetric(MetricName metricName)
focal_class.class_method_signature: Metrics.addReporter(MetricsReporter reporter)
focal_class.full_signature: public synchronized void addReporter(MetricsReporter reporter)
focal_class.identifier: addReporter
focal_class.modifiers: public synchronized
focal_class.parameters: (MetricsReporter reporter)
focal_class.return: void
focal_class.signature: void addReporter(MetricsReporter reporter)
focal_class.class_method_signature: Metrics.registerMetric(KafkaMetric metric)
focal_class.full_signature: synchronized void registerMetric(KafkaMetric metric)
focal_class.identifier: registerMetric
focal_class.modifiers: synchronized
focal_class.parameters: (KafkaMetric metric)
focal_class.return: void
focal_class.signature: void registerMetric(KafkaMetric metric)
focal_class.class_method_signature: Metrics.metrics()
focal_class.full_signature: public Map<MetricName, KafkaMetric> metrics()
focal_class.identifier: metrics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<MetricName, KafkaMetric>
focal_class.signature: Map<MetricName, KafkaMetric> metrics()
focal_class.class_method_signature: Metrics.childrenSensors()
focal_class.full_signature:  Map<Sensor, List<Sensor>> childrenSensors()
focal_class.identifier: childrenSensors
focal_class.parameters: ()
focal_class.return: Map<Sensor, List<Sensor>>
focal_class.signature: Map<Sensor, List<Sensor>> childrenSensors()
focal_class.class_method_signature: Metrics.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: public MetricName metricName(String name, String group, String description, Map<String, String> tags) {
          Map<String, String> combinedTag = new LinkedHashMap<>(config.tags());
          combinedTag.putAll(tags);
          return new MetricName(name, group, description, combinedTag);
      }
focal_method.class_method_signature: Metrics.metricName(String name, String group, String description, Map<String, String> tags)
focal_method.full_signature: public MetricName metricName(String name, String group, String description, Map<String, String> tags)
focal_method.identifier: metricName
focal_method.invocations: tags putAll
focal_method.modifiers: public
focal_method.parameters: (String name, String group, String description, Map<String, String> tags)
focal_method.return: MetricName
focal_method.signature: MetricName metricName(String name, String group, String description, Map<String, String> tags)