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 100k read benchmark & client/server bench variants #463

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

alexheretic
Copy link
Contributor

@alexheretic alexheretic commented Dec 13, 2024

Expand the write bench to have server & client variants and include a mix of binary & text messages to more broadly reflect overall performance.

Add a new "read" bench to similarly bench read performance of client & server. There is no simulated delay in the read "Stream" implementation so the latency should all be from the crate.

Example output: cargo bench --bench \* -- --quick --quiet --noplot

read+unmask 100k small messages (server)
                        time:   [13.611 ms 13.757 ms 13.793 ms]

read 100k small messages (client)
                        time:   [10.041 ms 10.295 ms 10.359 ms]

write 100k small messages then flush (server)
                        time:   [3.6911 ms 3.7038 ms 3.7070 ms]

write+mask 100k small messages then flush (client)
                        time:   [5.2245 ms 5.2252 ms 5.2283 ms]

Include binary & text messages in bench.
@daniel-abramov daniel-abramov merged commit 31532a0 into snapview:master Dec 13, 2024
7 checks passed
@alexheretic alexheretic deleted the 100k-read-bench branch December 13, 2024 17:50
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.

2 participants