Skip to content

Commit

Permalink
ZioKafkaConsumerbenchmark.throughput: increase count per batch
Browse files Browse the repository at this point in the history
This is more consistent with the manual kafka client benchmark equivalent
  • Loading branch information
svroonland committed Nov 30, 2024
1 parent bdde6e3 commit 7df5e80
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ class ZioKafkaConsumerBenchmark extends ConsumerZioBenchmark[Kafka with Producer
counter <- Ref.make(0)
_ <- Consumer
.plainStream(Subscription.topics(topic1), Serde.byteArray, Serde.byteArray)
.tap { _ =>
counter.updateAndGet(_ + 1).flatMap(count => Consumer.stopConsumption.when(count == recordCount))
.chunks
.tap { batch =>
counter
.updateAndGet(_ + batch.size)
.flatMap(count => Consumer.stopConsumption.when(count == recordCount))
}
.runDrain
.provideSome[Kafka](env)
Expand Down

0 comments on commit 7df5e80

Please sign in to comment.