void recordCommit(long duration, boolean success, Throwable error) {
            if (success) {
                commitTime.record(duration);
                commitAttempts.record(1.0d);
            } else {
                commitAttempts.record(0.0d);
            }
        }
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