public void add(RecordValidationStats stats) {
        temporaryMemoryBytes += stats.temporaryMemoryBytes;
        numRecordsConverted += stats.numRecordsConverted;
        conversionTimeNanos += stats.conversionTimeNanos;
    }
This class tracks resource usage during broker record validation for eventual reporting in metrics.
Record validation covers integrity checks on inbound data (e.g. checksum verification), structural
validation to make sure that records are well-formed, and conversion between record formats if needed.
clients/src/main/java/org/apache/kafka/common/record/RecordValidationStats.java