chia7712 commented on a change in pull request #9223: URL: https://github.com/apache/kafka/pull/9223#discussion_r485761001
########## File path: jmh-benchmarks/src/main/java/org/apache/kafka/jmh/record/RecordBatchIterationBenchmark.java ########## @@ -142,15 +169,15 @@ private ByteBuffer createBatch(int batchSize) { break; } - builder.append(0, null, value); + builder.append(0, null, value, headers); } return builder.build().buffer(); } @Benchmark public void measureValidation(Blackhole bh) throws IOException { MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate()); - LogValidator.validateMessagesAndAssignOffsetsCompressed(records, new TopicPartition("a", 0), + LogValidator.validateMessagesAndAssignOffsets(records, new TopicPartition("a", 0), Review comment: > it would be better to have another benchmark for the uncompressed case. I creates two new classes - ```CompressedRecordBatchValidationBenchmark``` and ```UncompressedRecordBatchValidationBenchmark```. They use different compression type and measure different validation function. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org