Skip to content
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

Add cassandra codec benches #789

Merged
merged 2 commits into from
Sep 8, 2022
Merged

Add cassandra codec benches #789

merged 2 commits into from
Sep 8, 2022

Conversation

rukai
Copy link
Member

@rukai rukai commented Sep 6, 2022

The message used in the encode_cassandra_system.local_result benchmark is taken directly from a real system.local response.
After implementing this I realized it was way too much work manually converting the message to the rusty frame types.
So I think we would probably be better off with just taking a raw binary message, and then programmatically decoding it into a frame before the bench runs.

However I've got this now and its fine was just more effort than was needed, so if others are happy to, we can land this and then rewrite to the raw binary approach if we want to add more cases later on.

Copy link
Member

@conorbros conorbros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want benches for decoding aswell?

If we are going down this path we might want benches for the frame methods too.

Anyway that's just thinking aloud for future plans, gets go ahead with this.

@rukai
Copy link
Member Author

rukai commented Sep 6, 2022

Do we want benches for decoding aswell?

Yeah

If we are going down this path we might want benches for the frame methods too.

Good point.

I think the complete state of these benchmarks would look like:
for each message we are testing:

  • bench encode from raw bytes
  • bench encode from frame
  • bench decode without frame call
  • bench decode with frame() call (or maybe just bench the frame() call itself)

Maybe we can automate all of these starting from just a single raw bytes message.

@rukai rukai enabled auto-merge (squash) September 8, 2022 02:06
@rukai rukai merged commit e2b8032 into shotover:main Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants