Repository: apache/kafka
File: coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntimeMetricsImpl.java (Java)

Code before:
     * The event queue time metric name.
     */
    public static final String EVENT_PROCESSING_TIME_METRIC_NAME = "event-processing-time-ms";

    /**
     * The event purgatory time metric name.
     */
    public static final String EVENT_PURGATORY_TIME_METRIC_NAME = "event-purgatory-time-ms";

    /**
     * The effective batch linger time metric name.
     */
    public static final String BATCH_LINGER_TIME_METRIC_NAME = "batch-linger-time-ms";

    /**
     * The flush time metric name.
     */
    public static final String BATCH_FLUSH_TIME_METRIC_NAME = "batch-flush-time-ms";

    /**
     * The cached buffer size metric name.
     */
    public static final String BATCH_BUFFER_CACHE_SIZE_METRIC_NAME = "batch-buffer-cache-size-bytes";

    /**
     * The buffer skip cache count metric name.
     */
    public static final String BATCH_BUFFER_CACHE_DISCARD_COUNT_METRIC_NAME = "batch-buffer-cache-discard-count";

    /**
     * Metric to count the number of partitions in Loading state.
     */
    private final MetricName numPartitionsLoading;
    private final AtomicLong numPartitionsLoadingCounter = new AtomicLong(0);

    /**
     * Metric to count the number of partitions in Active state.
     */
    private final MetricName numPartitionsActive;
    private final AtomicLong numPartitionsActiveCounter = new AtomicLong(0);

    /**
     * Metric to count the number of partitions in Failed state.
     */
    private final MetricName numPartitionsFailed;
    private final AtomicLong numPartitionsFailedCounter = new AtomicLong(0);

    /**
     * Metric to count the size of the processor queue.
     */
    private final MetricName eventQueueSize;

Review comment (performance):
nit:
```suggestion
     * The buffer cache discard count metric name.
```

Code after:
     * The event queue time metric name.
     */
    public static final String EVENT_PROCESSING_TIME_METRIC_NAME = "event-processing-time-ms";

    /**
     * The event purgatory time metric name.
     */
    public static final String EVENT_PURGATORY_TIME_METRIC_NAME = "event-purgatory-time-ms";

    /**
     * The effective batch linger time metric name.
     */
    public static final String BATCH_LINGER_TIME_METRIC_NAME = "batch-linger-time-ms";

    /**
     * The flush time metric name.
     */
    public static final String BATCH_FLUSH_TIME_METRIC_NAME = "batch-flush-time-ms";

    /**
     * The buffer cache size metric name.
     */
    public static final String BATCH_BUFFER_CACHE_SIZE_METRIC_NAME = "batch-buffer-cache-size-bytes";

    /**
     * The buffer cache discard count metric name.
     */
    public static final String BATCH_BUFFER_CACHE_DISCARD_COUNT_METRIC_NAME = "batch-buffer-cache-discard-count";

    /**
     * Metric to count the number of partitions in Loading state.
     */
    private final MetricName numPartitionsLoading;
    private final AtomicLong numPartitionsLoadingCounter = new AtomicLong(0);

    /**
     * Metric to count the number of partitions in Active state.
     */
    private final MetricName numPartitionsActive;
    private final AtomicLong numPartitionsActiveCounter = new AtomicLong(0);

    /**
     * Metric to count the number of partitions in Failed state.
     */
    private final MetricName numPartitionsFailed;
    private final AtomicLong numPartitionsFailedCounter = new AtomicLong(0);

    /**
     * Metric to count the size of the processor queue.
     */
    private final MetricName eventQueueSize;