Skip to content

Commit 92cc406

Browse files
BridgeARMylesBorins
authored andcommitted
test: refactor all benchmark tests to use the new test option
This reverts commit aa0a01b. PR-URL: #31755 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 5d92cec commit 92cc406

32 files changed

+34
-324
lines changed

test/benchmark/test-benchmark-assert.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,4 @@ require('../common');
77

88
const runBenchmark = require('../common/benchmark');
99

10-
runBenchmark(
11-
'assert',
12-
[
13-
'strict=1',
14-
'len=1',
15-
'method=',
16-
'n=1',
17-
'primitive=null',
18-
'size=1',
19-
'type=Int8Array'
20-
]
21-
);
10+
runBenchmark('assert');

test/benchmark/test-benchmark-async-hooks.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,4 @@ if (!common.enoughTestMem)
1010

1111
const runBenchmark = require('../common/benchmark');
1212

13-
runBenchmark('async_hooks',
14-
[
15-
'asyncHooks=all',
16-
'connections=50',
17-
'method=trackingDisabled',
18-
'n=10',
19-
'type=async-resource',
20-
'asyncMethod=async'
21-
],
22-
{});
13+
runBenchmark('async_hooks');

test/benchmark/test-benchmark-buffer.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
runBenchmark('buffers',
8-
[
9-
'aligned=true',
10-
'args=1',
11-
'buffer=fast',
12-
'bytes=0',
13-
'byteLength=1',
14-
'charsPerLine=6',
15-
'difflen=false',
16-
'encoding=utf8',
17-
'endian=BE',
18-
'extraSize=1',
19-
'len=256',
20-
'linesCount=1',
21-
'method=',
22-
'n=1',
23-
'partial=true',
24-
'pieces=1',
25-
'pieceSize=1',
26-
'search=@',
27-
'size=1',
28-
'source=array',
29-
'type=',
30-
'value=0',
31-
'withTotalLength=0'
32-
],
33-
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
7+
runBenchmark('buffers', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

test/benchmark/test-benchmark-child-process.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
runBenchmark('child_process',
8-
[
9-
'dur=0',
10-
'n=1',
11-
'len=1',
12-
'params=1',
13-
'methodName=execSync',
14-
],
15-
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
7+
runBenchmark('child_process', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

test/benchmark/test-benchmark-cluster.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
runBenchmark('cluster', [
8-
'n=1',
9-
'payload=string',
10-
'sendsPerBroadcast=1',
11-
'serialization=json',
12-
]);
7+
runBenchmark('cluster');

test/benchmark/test-benchmark-crypto.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,4 @@ if (common.hasFipsCrypto)
1010

1111
const runBenchmark = require('../common/benchmark');
1212

13-
runBenchmark('crypto',
14-
[
15-
'algo=sha256',
16-
'api=stream',
17-
'cipher=',
18-
'keylen=1024',
19-
'len=1',
20-
'n=1',
21-
'out=buffer',
22-
'size=1',
23-
'type=buf',
24-
'v=crypto',
25-
'writes=1',
26-
],
27-
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
13+
runBenchmark('crypto', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

test/benchmark/test-benchmark-dgram.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
// Because the dgram benchmarks use hardcoded ports, this should be in
8-
// sequential rather than parallel to make sure it does not conflict with
9-
// tests that choose random available ports.
7+
// Dgram benchmarks use hardcoded ports. Thus, this test can not be run in
8+
// parallel with tests that choose random ports.
109

11-
runBenchmark('dgram', ['address=true',
12-
'chunks=2',
13-
'dur=0.1',
14-
'len=1',
15-
'n=1',
16-
'num=1',
17-
'type=send']);
10+
runBenchmark('dgram');

test/benchmark/test-benchmark-dns.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
const env = { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 };
8-
9-
runBenchmark('dns', ['n=1', 'all=false', 'name=127.0.0.1'], env);
7+
runBenchmark('dns', { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

test/benchmark/test-benchmark-domain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
runBenchmark('domain', ['n=1', 'args=0']);
7+
runBenchmark('domain');

test/benchmark/test-benchmark-es.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,4 @@ require('../common');
44

55
const runBenchmark = require('../common/benchmark');
66

7-
runBenchmark('es',
8-
[
9-
'method=',
10-
'count=1',
11-
'context=null',
12-
'rest=0',
13-
'mode=',
14-
'n=1',
15-
'encoding=ascii',
16-
'size=1e1'
17-
],
18-
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
7+
runBenchmark('es', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

0 commit comments

Comments
 (0)