Registry / testing / criterion-macro

criterion-macro

JSON →
library0.4.0rscratesunverified

Custom Test Framework macro for Criterion.rs, enabling benchmark-driven testing.

# Cargo.toml [dependencies] criterion-macro = "0.4.0"
INSTALL
IMPORT
SIG · CRITERION-MACRO
C
criterion-macro
testingrustv0.4.0
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.

criterion
use criterion_macro::criterion;

Define a benchmark using the criterion macro.

use criterion_macro::criterion; #[criterion] fn bench_my_function(b: &mut criterion::Bencher) { b.iter(|| 2 + 2); }
Debug
Known issues
gotchaRequires nightly Rust for custom test frameworks.
fix
Switch to stable Rust and use Criterion's standard API instead.
affects: >=0.4.0
Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
criterion-macro — cargo add criterion-macro · libregistry