Reduce benchmark runtime on CI (#3896)

After adding the `call`-oriented benchmark recently I just noticed that
running benchmarks on CI is taking 30+ minutes which is not intended.
Instead of running a full benchmark run on CI (which I believe we're not
looking at anyway) instead only run the benchmarks for a single
iteration to ensure they still work but otherwise don't collect
statistics about them.

Additionally cap the number of parallel instantiations to 16 to avoid
running tons of tests for machines with lots of cpus.
This commit is contained in:
Alex Crichton
2022-03-07 13:41:42 -06:00
committed by GitHub
parent 7b0238fd7e
commit 7c3dd3398d
2 changed files with 3 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ fn bench_parallel(c: &mut Criterion, path: &Path) {
(engine, pre)
});
for threads in 1..=num_cpus::get_physical() {
for threads in 1..=num_cpus::get_physical().min(16) {
let name = format!(
"{}: with {} thread{}",
path.file_name().unwrap().to_str().unwrap(),