Registry / testing / bencher

bencher

JSON →
library0.1.5rscratesunverified

A port of the libtest (unstable Rust) benchmark runner to Rust stable releases. Supports running benchmarks and filtering based on the name. Benchmark execution works exactly the same way and no more (caveat: black_box is still missing!).

# Cargo.toml [dependencies] bencher = "0.1.5"
INSTALL
IMPORT
SIG · BENCHER
B
bencher
testingrustv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bencher
use bencher::Bencher;

Define and run a benchmark using the bencher crate.

use bencher::{Bencher, benchmark_group, benchmark_main}; fn bench_my_function(b: &mut Bencher) { b.iter(|| { // code to benchmark }); } benchmark_group!(benches, bench_my_function); benchmark_main!(benches);
Debug
Known issues
gotchablack_box is not implemented; use std::hint::black_box for stable Rust.
fix
Replace bencher's missing black_box with std::hint::black_box.
affects: >=0.1
Upgrade
Version history
0.1.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
bencher — cargo add bencher · libregistry