private void addRatioMetric(final State matchingState, MetricNameTemplate template) {
            MetricName metricName = metricGroup.metricName(template);
            metricGroup.metrics().addMetricIfAbsent(metricName, null, (Gauge<Double>) (config, now) ->
                    taskStateTimer.durationRatio(matchingState, now));
        }
Record that a batch of records has been processed.

@param size the number of records in the batch
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java