Skip to content

added benchmark script#49

Open
zloyrusskiy wants to merge 1 commit intodizda:masterfrom
zloyrusskiy:chore_dirty_simple_benchmark_script
Open

added benchmark script#49
zloyrusskiy wants to merge 1 commit intodizda:masterfrom
zloyrusskiy:chore_dirty_simple_benchmark_script

Conversation

@zloyrusskiy
Copy link
Contributor

No description provided.

@dizda
Copy link
Owner

dizda commented Apr 2, 2024

Sorry why using proxychains here @zloyrusskiy ?

@zloyrusskiy
Copy link
Contributor Author

I need a fast way to evaluate performance, I want to add serialization/deserialization of protocol stages for declarativeness and easier project support. Writing my own tool for benchmarks is a complex task, I didn't want to spend time on it. I thought iperf3 was a good option, but to make it work over socks5, you either need to compile a patched version or wrap it in a tricky way like this. But I looked at the overhead from this approach and realized that you are right. I'll try to explore this topic further.
For now, I'm looking towards:

https://pkolaczk.github.io/benchmarking-cassandra-with-rust-streams/

https://docs.rs/balter/0.4.0/balter/

https://github.com/tokio-rs/tokio/blob/e9ae5d4ce993d8c8611b86065f1fe26188fff0ca/stress-test/examples/simple_echo_tcp.rs

@dizda
Copy link
Owner

dizda commented Apr 3, 2024

This is interesting, let me know how that goes

@dizda
Copy link
Owner

dizda commented Apr 22, 2024

hey @zloyrusskiy

Any update on this? 🙏

@zloyrusskiy
Copy link
Contributor Author

I'm working on it. I integrate with https://github.com/bheisler/criterion.rs

@dizda
Copy link
Owner

dizda commented Jun 3, 2024

Thank you @zloyrusskiy

@dizda
Copy link
Owner

dizda commented Feb 6, 2025

@valpackett wdyt about this bench?

@yuguorui
Copy link
Contributor

yuguorui commented Feb 6, 2025

In my humble opinion, perhaps performance testing should be done by cargo bench with handcrafted testcases, since it avoids introducing additional dependencies and extra performance overhead from the dependencies.

In addition, this performance test is basically testing the performance of tokio::io::copy_bidirectional.

@valpackett
Copy link
Contributor

I guess it's better than nothing…?

this performance test is basically testing the performance of tokio::io::copy_bidirectional

That will come in handy for measuring the benefits of things like tokio-splice tho :)

@dizda
Copy link
Owner

dizda commented Feb 6, 2025

Maybe having a docker conf to launch the bench script would be handy in this case, to avoid installing the libs locally on different architecture.

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.

4 participants