From f7d0e920bbf69ebb30f0985de081f515fa76541c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 9 Oct 2017 23:56:21 -0700 Subject: [PATCH] test: reduce run time for misc benchmark tests Run only one benchmark for each benchmark file tested by test-benchmark-misc.js. --- benchmark/misc/console.js | 2 ++ benchmark/misc/object-property-bench.js | 2 ++ benchmark/misc/punycode.js | 2 ++ test/parallel/test-benchmark-misc.js | 7 ++++--- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/benchmark/misc/console.js b/benchmark/misc/console.js index 8e9fbd8c543aad..ab938168ac30c4 100644 --- a/benchmark/misc/console.js +++ b/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; diff --git a/benchmark/misc/object-property-bench.js b/benchmark/misc/object-property-bench.js index 8ac7683cd54d7e..d6afd4e9c0bcbb 100644 --- a/benchmark/misc/object-property-bench.js +++ b/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; diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js index 74ddadbb9daa6c..630aea3195f098 100644 --- a/benchmark/misc/punycode.js +++ b/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; diff --git a/test/parallel/test-benchmark-misc.js b/test/parallel/test-benchmark-misc.js index cda74f1693c0cf..df3bae4706a2c5 100644 --- a/test/parallel/test-benchmark-misc.js +++ b/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' ]);