-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support for async functions #39
Comments
I plan to support async functions and have some code in progress for it. This will likely come soon after allocation profiling. It wouldn't be until after or during the end of the month. |
Update: I now have an implementation of allocation profiling in #40. So maybe a week after that lands I'll get around to finishing async support. |
I'm glad to hear this is in progress. any update? I recently converted a couple modules from sync to async. I have divan benches for them that I can't build with the new async implementations. |
Moved this benchmark over from twenty_first. Presently unable to build the twenty_first db_* bench tests because the storage layer is now async and the divan bench crate doesn't yet support async. However, it may soon, see: nvzqz/divan#39
Moved this benchmark over from twenty_first. Presently unable to build the twenty_first db_* bench tests because the storage layer is now async and the divan bench crate doesn't yet support async. However, it may soon, see: nvzqz/divan#39
@nvzqz how does #[tokio::main]
async fn main() {
divan::main();
}
#[divan::bench]
fn some_non_async_function(bencher: Bencher) {
//
bencher.bench(|| block_on(some_async_function()));
} For more context |
I was trying out divan, and I'm wondering if there is support for benchmarking async functions, e.g. using a tokio runtime (cf. https://bheisler.github.io/criterion.rs/book/user_guide/benchmarking_async.html#benchmarking-async-functions)?
Feel free to close this issue if this was answered elsewhere.
The text was updated successfully, but these errors were encountered: