ijuma commented on a change in pull request #9223:
URL: https://github.com/apache/kafka/pull/9223#discussion_r485675758



##########
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:
       Right, but the goal of this benchmark was to test the compressed case 
where there is additional overhead due to compression buffer allocation and so 
on. As you say, it would be better to have another benchmark for the 
uncompressed case.




----------------------------------------------------------------
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


Reply via email to