-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple producer benchmark #1310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! I propose we:
- move construction of ProducerRecord to outside the benchmark
- in the benchmark we publish 100 chunks of 5000 small messages
WDYT?
zio-kafka-bench/src/main/scala/zio/kafka/bench/ProducerBenchmark.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that there is one super-tiny thing we can improve: use a binary key/value. Because we now using string, there is the tiny overhead of converting string to byte array. I am not sure if you want to put in the effort, and this is most probably already good.
FYI, I have removed the first run of this new bench from the charts at https://zio.github.io/zio-kafka/dev/bench/ because it was producing a lot less data and is therefore not comparable with later runs. |
I think it doesn't really matter since this isn't currently a benchmark about how much performance we can squeeze out of the Producer. It's just to have a reference for future changes. |
You're right, good point 👍 |
Would be nice to have a "max performance" benchmark though, using the *async methods, batching and clever pipelining. |
It's not much, but it gives us something to compare against.
Relates to #1304