This repository contains benches for criterion.rs along with the programs used for benchmarking. The goal of this was to get a feel for the library while also applying it to a program we care about.
Since the benchmarking may take a while, we have pre-generated reports for each of the programs for convenience. This will give a feel of what they might look like when generating the reports. To view all of these reports, go to this directory and view index.html in your browser. For generating the reports, continue to the usage section
This assumes Rust has already been installed. If it has not, install it here
Valgrind must also be installed. On debian based distributions, this can be installed with
apt install valgrindCurrent releases of valgrind can also be downloaded here
Gungraun needs its benchmark runner to run benchmarks. To get this, install the following globally with cargo using:
cargo install --version "0.17.0" gungraun-runnerNow all that needs to be done is to clone the repository and go into the top level directory
git clone https://github.com/JFielding7/SoftwareTestingCriterionProject.git
cd SoftwareTestingCriterionProjectNow the benchmarks are ready to be ran!
All benches can be ran with:
cargo benchIt is possible to run individual files, groups and bench functions For example, running the bench functions for the sorts file would look like
cargo bench --bench "sorts"Here is an example of running the group "sort_random"
cargo bench -- "sort_random"Here is an example of running a bench function from a group. This runs the stable bench function under group sort_random
cargo bench -- "sort_random/stable"It is also possible to use regex to pattern match benches For example:
cargo bench -- "sort_random/(stable|unstable)"