{"repo":"nvzqz/divan","free":true,"listed":false,"github":"https://github.com/nvzqz/divan","clone":"git clone https://github.com/nvzqz/divan.git","description":"Fast and simple benchmarking for Rust projects","language":"Rust","stars":1438,"topics":["benchmark","fast","rust","simple","performance"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"Divan Comfy bench marking for Rust projects, brought to you by Nikolai Vazquez . Sponsor If you or your company find Divan valuable, consider sponsoring on GitHub or donating via PayPal. Sponsorships help me progress on what's possible with benchmarking in Rust. Guide A guide is being worked on. In the meantime, see: - Announcement post - \"Proving Performance\" FOSDEM talk Getting Started Divan 0.1.21 requires Rust 1.80.0 or later. 1. Add the following to your project's Cargo.toml : 2. Create a benchmarks file at benches/example.rs [^1] with your benchmarking code: 3. Run your benchmarks with cargo bench : See [ #[divan::bench] ][bench attr] for info on benchmark function registration. Checking benchmarks in CI If you want to run each benchmarked function only once (to check that they don't panic without measuring their performance), you can run the benchmark runner crate with the --test parameter. You can do so by running either or Examples Practical example benchmarks can be found in the examples/benches directory. These can be benchmarked locally by running: More thorough usage examples can be found in the [ #[divan::bench] documentation][bench attr examples]. License Like the Rust project, this library may be used under either the MIT License or Apache License (Version 2.0). [^1]: Within your crate directory, i.e. $CARGO MANIFEST DIR [bench attr]: https://docs.rs/divan/latest/divan/attr.bench.html [bench attr examples]: https://docs.rs/divan/latest/divan/attr.bench.html#ex","default_branch":null,"files":null,"tree":[],"storefront":"/r/nvzqz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nvzqz/divan/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}