How to bench a function with a #[test] attribute with Criterion

601 Views Asked by At

I want to bench a function with criterion crate, this function is also a test function. It seems not to be possible to call the function during benchmarking when the #[test] attribute is present.

#[test]
fn verify_encryption() {
    // ...
}

A function that runs an integration test (check that a set of functions behave as expected) is also a good target for benchmark. Is there a workaround ?

0

There are 0 best solutions below