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

Tokio benchmark results may be significantly inaccurate #651

Closed
huntc opened this issue Feb 10, 2023 · 1 comment
Closed

Tokio benchmark results may be significantly inaccurate #651

huntc opened this issue Feb 10, 2023 · 1 comment

Comments

@huntc
Copy link

huntc commented Feb 10, 2023

I believe that most benchmarking of Tokio-based usage will yield figures that are significantly incorrect. This is due to Tokio's block_on's future not being executed as a worker task. More information is here: tokio-rs/tokio#5446

Would a PR be welcome where we address this issue, perhaps by requiring Criterion's block_on to have a result with Send and then performing a spawn? Alternatively, a new block_on_worker method?

My Criterion-based benchmarks made me spend hours working out why my library was slow, when in fact it turned out to be the way I was using Tokio with block_on.

@huntc
Copy link
Author

huntc commented Feb 22, 2023

Closing as there doesn't appear to be any interest after two weeks.

@huntc huntc closed this as completed Feb 22, 2023
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

No branches or pull requests

1 participant