Skip to content

Commit

Permalink
benchmark: adjust config for deepEqual object
Browse files Browse the repository at this point in the history
This should make easier to read on benchmark/compare
and when generating graphs

PR-URL: #55254
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
  • Loading branch information
RafaelGSS authored and marco-ippolito committed Nov 17, 2024
1 parent 5d28d98 commit 01f0b0e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions benchmark/assert/deepequal-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
n: [25, 2e2, 2e3],
size: [1e2, 1e3, 1e4],
strict: [1],
method: ['deepEqual', 'notDeepEqual'],
n: [25, 2e2],
size: [1e2, 1e4],
method: ['deepEqual', 'notDeepEqual', 'deepStrictEqual', 'notDeepStrictEqual'],
}, {
combinationFilter: (p) => {
return p.size === 1e4 && p.n === 25 ||
Expand All @@ -30,10 +29,7 @@ function createObj(size, add = '') {
}));
}

function main({ size, n, method, strict }) {
if (strict) {
method = method.replace('eep', 'eepStrict');
}
function main({ size, n, method }) {
const fn = assert[method];

const actual = createObj(size);
Expand Down

0 comments on commit 01f0b0e

Please sign in to comment.