use of kafka.common.LongRef in project kafka by apache.
the class UncompressedRecordBatchValidationBenchmark method measureAssignOffsetsNonCompressed.
@Benchmark
public void measureAssignOffsetsNonCompressed(Blackhole bh) {
MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
LogValidator.assignOffsetsNonCompressed(records, new TopicPartition("a", 0), new LongRef(startingOffset), System.currentTimeMillis(), false, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0, new AppendOrigin.Client$(), messageVersion, brokerTopicStats);
}
use of kafka.common.LongRef in project kafka by apache.
the class CompressedRecordBatchValidationBenchmark method measureValidateMessagesAndAssignOffsetsCompressed.
@Benchmark
public void measureValidateMessagesAndAssignOffsetsCompressed(Blackhole bh) {
MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
LogValidator.validateMessagesAndAssignOffsetsCompressed(records, new TopicPartition("a", 0), new LongRef(startingOffset), Time.SYSTEM, System.currentTimeMillis(), CompressionCodec.getCompressionCodec(compressionType.id), CompressionCodec.getCompressionCodec(compressionType.id), false, messageVersion, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0, new AppendOrigin.Client$(), ApiVersion.latestVersion(), brokerTopicStats, requestLocal);
}
Aggregations