# About benches The `benches` directory contains benchmarks that test scryer-prolog performance. Benchmarks are run via two harnesses: * `criterion` - criterion performs statistical analysis of benchmark runs and is great for benchmarking locally. * `iai-callgrind` - this runs the benchmark with callgrind, which is able to precisely track the number of instructions executed during the run. This is especially helpful in a public CI runner context where neighboring VMs can cause a very high wall time variance. While instructions executed is only correlated with the desired metric (wall time), this is a good tradeoff for CI where that metric is unreliable. Run benchmarks with the following commands: ``` cargo bench --bench run_criterion # run a particular criterion benchmark cargo bench --bench run_criterion -- # run in profiling mode which outputs flamegraphs. Set profile time in seconds: cargo bench --bench run_criterion -- --profile-time