mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
benchmark: adjust config for deepEqual object
This should make easier to read on benchmark/compare and when generating graphs PR-URL: https://github.com/nodejs/node/pull/55254 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
This commit is contained in:
parent
90f56dbad9
commit
aeadaba03f
@ -4,10 +4,9 @@ const common = require('../common.js');
|
|||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
|
||||||
const bench = common.createBenchmark(main, {
|
const bench = common.createBenchmark(main, {
|
||||||
n: [25, 2e2, 2e3],
|
n: [25, 2e2],
|
||||||
size: [1e2, 1e3, 1e4],
|
size: [1e2, 1e4],
|
||||||
strict: [1],
|
method: ['deepEqual', 'notDeepEqual', 'deepStrictEqual', 'notDeepStrictEqual'],
|
||||||
method: ['deepEqual', 'notDeepEqual'],
|
|
||||||
}, {
|
}, {
|
||||||
combinationFilter: (p) => {
|
combinationFilter: (p) => {
|
||||||
return p.size === 1e4 && p.n === 25 ||
|
return p.size === 1e4 && p.n === 25 ||
|
||||||
@ -30,10 +29,7 @@ function createObj(size, add = '') {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
function main({ size, n, method, strict }) {
|
function main({ size, n, method }) {
|
||||||
if (strict) {
|
|
||||||
method = method.replace('eep', 'eepStrict');
|
|
||||||
}
|
|
||||||
const fn = assert[method];
|
const fn = assert[method];
|
||||||
|
|
||||||
const actual = createObj(size);
|
const actual = createObj(size);
|
||||||
|
Loading…
Reference in New Issue
Block a user