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>
This commit is contained in:
parent
6b5433dcd2
commit
ce848a4501
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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…
x
Reference in New Issue
Block a user