bheisler / iai

Experimental one-shot benchmarking/profiling harness for Rust
Apache License 2.0
578 stars 23 forks source link

Allow for benchmark setup code #24

Open reknih opened 2 years ago

reknih commented 2 years ago

This PR allows to include setup code for each benchmark that will be excluded by the measurement. It achieves this by running each benchmark twice, once with, and once without the user's setup code. The setup runtime can then be excluded from the final figures. A Criterion-like task runner struct is introduced for this purpose.

Furthermore, the PR contains a small feature that allows filtering the benchmarks by name on the command line.

Merging this would close #20 and #23.

AlexMikhalev commented 2 years ago

Looking forward to this PR being merged and crate republished.