Closed radevgit closed 11 months ago
Divan is able to benchmark internals of a library. As of 558176a, Divan now benchmarks some of its own internals in CI:
[!NOTE] Your code should not do
crate = crate
since this only applies to Divan.
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.
cc @realFlowControl @AliciaBytes @CyriacBr @HadrienG2 @IndigoLily
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.