Browse Source

test: reduce run time for misc benchmark tests

Run only one benchmark for each benchmark file tested by
test-benchmark-misc.js.

PR-URL: https://github.com/nodejs/node/pull/16120
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
v9.x-staging
Rich Trott 7 years ago
parent
commit
ce848a4501
  1. 2
      benchmark/misc/console.js
  2. 2
      benchmark/misc/object-property-bench.js
  3. 2
      benchmark/misc/punycode.js
  4. 7
      test/parallel/test-benchmark-misc.js

2
benchmark/misc/console.js

@ -93,6 +93,8 @@ function runUsingArgumentsAndApply(n, concat) {
function main(conf) {
const n = +conf.n;
switch (conf.method) {
// '' is a default case for tests
case '':
case 'restAndSpread':
runUsingRestAndSpread(n, conf.concat);
break;

2
benchmark/misc/object-property-bench.js

@ -63,6 +63,8 @@ function main(conf) {
const n = +conf.millions * 1e6;
switch (conf.method) {
// '' is a default case for tests
case '':
case 'property':
runProperty(n);
break;

2
benchmark/misc/punycode.js

@ -63,6 +63,8 @@ function main(conf) {
const n = +conf.n;
const val = conf.val;
switch (conf.method) {
// '' is a default case for tests
case '':
case 'punycode':
runPunycode(n, val);
break;

7
test/parallel/test-benchmark-misc.js

@ -5,9 +5,10 @@ require('../common');
const runBenchmark = require('../common/benchmark');
runBenchmark('misc', [
'n=1',
'val=magyarország.icom.museum',
'concat=0',
'method=',
'millions=.000001',
'n=1',
'type=extend',
'concat=0'
'val=magyarország.icom.museum'
]);

Loading…
Cancel
Save