-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Benches in src for lib #2
Comments
Divan is able to benchmark internals of a library. As of 558176a, Divan now benchmarks some of its own internals in CI: Lines 176 to 196 in 558176a
Note Your code should not do Feel free to use 558176a as a guide for benchmarking your own library's internals. That said, this solution is rather clunky and I wish we had something better. |
All the given code examples assume the benches are created in /examples/...
Is it possible to have benches in /src/something.rs for a library project?
I tried to use #[divan::bench] the same way I use the #[test], in every module and used the
[dependencies]
divan = "0.1.0"
in Cargo.toml, however the "cargo bench" does not produce any results (only run tests).
Maybe we need some examples how to do it in that case.
The text was updated successfully, but these errors were encountered: