Back to Browse

Rust: How to run benchmark tests

2.6K views
Jun 26, 2020
28:41

We will go over two different ways of running benchmark tests in Rust. The first way is to use nightly Rust to run benchmark tests via the standard library's test crate. The second way to run your benchmark tests is to use the Criterion crate. Links: - Benchmark (Wiki): https://en.wikipedia.org/wiki/Benchmark_(computing) - Rust Test crate docs: https://doc.rust-lang.org/test/index.html - Benchmark test example (The Rust Unstable Book): https://doc.rust-lang.org/unstable-book/library-features/test.html?highlight=feature#test - Extern keyword docs: https://doc.rust-lang.org/std/keyword.extern.html - Rustup for managing Rust versions: https://doc.rust-lang.org/nightly/edition-guide/rust-2018/rustup-for-managing-rust-versions.html - Cargo test docs (The Cargo Book): https://doc.rust-lang.org/cargo/commands/cargo-test.html - Criterion crate: https://crates.io/crates/criterion - Criterion blog post I referenced: https://bheisler.github.io/post/benchmarking-with-criterion-rs/ My social links: - Twitter: https://twitter.com/Crazcalm - IG: https://www.instagram.com/crazcalm.tech.stack/

Download

0 formats

No download links available.

Rust: How to run benchmark tests | NatokHD