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



##########
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:
       > Why did we change this?
   
   run JMH with uncompressed data.
   
   The alternative way is that we can add an new benchmark for 
```assignOffsetsNonCompressed```. However, the test data of this class includes 
both uncompressed and compressed so it is weird to input compressed data to 
test ```assignOffsetsNonCompressed```.




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