Skip to content

Commit

Permalink
Collect more benchmark samples to reduce test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Oct 18, 2021
1 parent 589b334 commit 3f2c865
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions benchmarks/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ const semver = require('semver');

const [ { speed: cpuSpeed } ] = os.cpus();

// eslint-disable-next-line
console.log('cpu', os.cpus());

function getNodeVersionMultiplier() {
const currentNodeVersion = process.version;

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/runtime.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('runtime', () => {

const { medianDuration } = runBenchmark(() => {
lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 });
}, 25);
}, 50);

expect(medianDuration).to.be.below(budget);
});
Expand All @@ -106,7 +106,7 @@ describe('runtime', () => {

const { medianMemory } = runBenchmark(() => {
lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 });
}, 25);
}, 50);

expect(medianMemory).to.be.below(budget);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "npm run test:unit:with-coverage && npm run test:bench",
"test:unit": "mocha test --recursive --reporter dot",
"test:unit:with-coverage": "nyc npm run test:unit",
"test:bench": "mocha -t 1200000 benchmarks",
"test:bench": "mocha -t 2400000 benchmarks",
"coveralls": "cat ./build/coverage/lcov.info | coveralls",
"changelog": "pr-log"
},
Expand Down

0 comments on commit 3f2c865

Please sign in to comment.