Skip to content

Commit 9808c59

Browse files
Trotttargos
authored andcommitted
test: reduce run time for misc benchmark tests
Run only one benchmark for each benchmark file tested by test-benchmark-misc.js. PR-URL: #16120 Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent b0b224c commit 9808c59

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

benchmark/misc/console.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ function runUsingArgumentsAndApply(n, concat) {
9393
function main(conf) {
9494
const n = +conf.n;
9595
switch (conf.method) {
96+
// '' is a default case for tests
97+
case '':
9698
case 'restAndSpread':
9799
runUsingRestAndSpread(n, conf.concat);
98100
break;

benchmark/misc/object-property-bench.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ function main(conf) {
6363
const n = +conf.millions * 1e6;
6464

6565
switch (conf.method) {
66+
// '' is a default case for tests
67+
case '':
6668
case 'property':
6769
runProperty(n);
6870
break;

benchmark/misc/punycode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ function main(conf) {
6363
const n = +conf.n;
6464
const val = conf.val;
6565
switch (conf.method) {
66+
// '' is a default case for tests
67+
case '':
6668
case 'punycode':
6769
runPunycode(n, val);
6870
break;

test/parallel/test-benchmark-misc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ require('../common');
55
const runBenchmark = require('../common/benchmark');
66

77
runBenchmark('misc', [
8-
'n=1',
9-
'val=magyarország.icom.museum',
8+
'concat=0',
9+
'method=',
1010
'millions=.000001',
11+
'n=1',
1112
'type=extend',
12-
'concat=0'
13+
'val=magyarország.icom.museum'
1314
]);

0 commit comments

Comments
 (0)