Skip to content

Commit

Permalink
Increase initCount for our recorded benchmarks.
Browse files Browse the repository at this point in the history
This values is the number of times to run a benchmark before recording values.
It defaults to 1, but we want to have it be a high enough number to be more
likely to warm up the JIT so that benchmarks will likely be a bit fairer across
branches.

I'm not sure what a good value is, so this is very "finger in the wind".
  • Loading branch information
thegedge committed May 9, 2024
1 parent dcb4db5 commit d500123
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bench/all.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Suite } from "benchmark";
import { withCodSpeed } from "@codspeed/benchmark.js-plugin";
import { Suite } from "benchmark";
import findRoot from "find-root";
import fs from "fs";
import { LargeRoot } from "../spec/fixtures/LargeRoot";
import { FruitAisle } from "../spec/fixtures/FruitAisle";
import { LargeRoot } from "../spec/fixtures/LargeRoot";
import { TestClassModel } from "../spec/fixtures/TestClassModel";
import { BigTestModelSnapshot, TestModelSnapshot } from "../spec/fixtures/TestModel";

Expand Down Expand Up @@ -34,4 +34,7 @@ void suite
.on("complete", function (this: Suite) {
console.profileEnd();
})
.run({ async: true });
.run({
async: true,
initCount: 100
});

0 comments on commit d500123

Please sign in to comment.