diff --git a/test/benchmark/test-benchmark-assert.js b/test/benchmark/test-benchmark-assert.js index 5ec2319c28a15d..8a8ba0244489e5 100644 --- a/test/benchmark/test-benchmark-assert.js +++ b/test/benchmark/test-benchmark-assert.js @@ -7,4 +7,15 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('assert'); +runBenchmark( + 'assert', + [ + 'strict=1', + 'len=1', + 'method=', + 'n=1', + 'primitive=null', + 'size=1', + 'type=Int8Array' + ] +); diff --git a/test/benchmark/test-benchmark-async-hooks.js b/test/benchmark/test-benchmark-async-hooks.js index c9ea2c1e86dbdf..9951d8c9330804 100644 --- a/test/benchmark/test-benchmark-async-hooks.js +++ b/test/benchmark/test-benchmark-async-hooks.js @@ -10,4 +10,11 @@ if (!common.enoughTestMem) const runBenchmark = require('../common/benchmark'); -runBenchmark('async_hooks'); +runBenchmark('async_hooks', + [ + 'asyncHooks=all', + 'connections=50', + 'method=trackingDisabled', + 'n=10' + ], + {}); diff --git a/test/benchmark/test-benchmark-buffer.js b/test/benchmark/test-benchmark-buffer.js index af93842b0b92dd..57130ffb08ba3d 100644 --- a/test/benchmark/test-benchmark-buffer.js +++ b/test/benchmark/test-benchmark-buffer.js @@ -4,4 +4,30 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('buffers', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('buffers', + [ + 'aligned=true', + 'args=1', + 'buffer=fast', + 'bytes=0', + 'byteLength=1', + 'charsPerLine=6', + 'difflen=false', + 'encoding=utf8', + 'endian=BE', + 'extraSize=1', + 'len=256', + 'linesCount=1', + 'method=', + 'n=1', + 'partial=true', + 'pieces=1', + 'pieceSize=1', + 'search=@', + 'size=1', + 'source=array', + 'type=', + 'value=0', + 'withTotalLength=0' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-child-process.js b/test/benchmark/test-benchmark-child-process.js index 043620de12f165..365777069bc4cf 100644 --- a/test/benchmark/test-benchmark-child-process.js +++ b/test/benchmark/test-benchmark-child-process.js @@ -4,4 +4,12 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('child_process', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('child_process', + [ + 'dur=0', + 'n=1', + 'len=1', + 'params=1', + 'methodName=execSync', + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-cluster.js b/test/benchmark/test-benchmark-cluster.js index b24aced5d58dc3..26df7ec239a221 100644 --- a/test/benchmark/test-benchmark-cluster.js +++ b/test/benchmark/test-benchmark-cluster.js @@ -4,4 +4,9 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('cluster'); +runBenchmark('cluster', [ + 'n=1', + 'payload=string', + 'sendsPerBroadcast=1', + 'serialization=json', +]); diff --git a/test/benchmark/test-benchmark-crypto.js b/test/benchmark/test-benchmark-crypto.js index 7f6988acf234d8..6ba71471cf4be2 100644 --- a/test/benchmark/test-benchmark-crypto.js +++ b/test/benchmark/test-benchmark-crypto.js @@ -10,4 +10,18 @@ if (common.hasFipsCrypto) const runBenchmark = require('../common/benchmark'); -runBenchmark('crypto', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('crypto', + [ + 'algo=sha256', + 'api=stream', + 'cipher=', + 'keylen=1024', + 'len=1', + 'n=1', + 'out=buffer', + 'size=1', + 'type=buf', + 'v=crypto', + 'writes=1', + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-dgram.js b/test/benchmark/test-benchmark-dgram.js index ceafdd77a2aa80..8c93cd5a0c9239 100644 --- a/test/benchmark/test-benchmark-dgram.js +++ b/test/benchmark/test-benchmark-dgram.js @@ -4,7 +4,14 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -// Dgram benchmarks use hardcoded ports. Thus, this test can not be run in -// parallel with tests that choose random ports. +// Because the dgram benchmarks use hardcoded ports, this should be in +// sequential rather than parallel to make sure it does not conflict with +// tests that choose random available ports. -runBenchmark('dgram'); +runBenchmark('dgram', ['address=true', + 'chunks=2', + 'dur=0.1', + 'len=1', + 'n=1', + 'num=1', + 'type=send']); diff --git a/test/benchmark/test-benchmark-dns.js b/test/benchmark/test-benchmark-dns.js index 331a4c8ff0d85d..811e9a44b9e358 100644 --- a/test/benchmark/test-benchmark-dns.js +++ b/test/benchmark/test-benchmark-dns.js @@ -4,4 +4,6 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('dns', { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +const env = { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }; + +runBenchmark('dns', ['n=1', 'all=false', 'name=127.0.0.1'], env); diff --git a/test/benchmark/test-benchmark-domain.js b/test/benchmark/test-benchmark-domain.js index 5ebbfc5ea3b4db..e7d8b60b716441 100644 --- a/test/benchmark/test-benchmark-domain.js +++ b/test/benchmark/test-benchmark-domain.js @@ -4,4 +4,4 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('domain'); +runBenchmark('domain', ['n=1', 'args=0']); diff --git a/test/benchmark/test-benchmark-es.js b/test/benchmark/test-benchmark-es.js index 6886b3ce925746..47fe4ab3f91a63 100644 --- a/test/benchmark/test-benchmark-es.js +++ b/test/benchmark/test-benchmark-es.js @@ -4,4 +4,15 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('es', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('es', + [ + 'method=', + 'count=1', + 'context=null', + 'rest=0', + 'mode=', + 'n=1', + 'encoding=ascii', + 'size=1e1' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-events.js b/test/benchmark/test-benchmark-events.js index 53de4897dd75d2..06be60a84abb5b 100644 --- a/test/benchmark/test-benchmark-events.js +++ b/test/benchmark/test-benchmark-events.js @@ -4,4 +4,6 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('events', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('events', + ['argc=0', 'listeners=1', 'n=1'], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-fs.js b/test/benchmark/test-benchmark-fs.js index 3ef6be2b7ebaed..cf382407235304 100644 --- a/test/benchmark/test-benchmark-fs.js +++ b/test/benchmark/test-benchmark-fs.js @@ -6,4 +6,19 @@ const runBenchmark = require('../common/benchmark'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -runBenchmark('fs', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('fs', [ + 'bufferSize=32', + 'concurrent=1', + 'dir=.github', + 'dur=0.1', + 'encodingType=buf', + 'filesize=1024', + 'len=1024', + 'mode=callback', + 'n=1', + 'pathType=relative', + 'size=1', + 'statSyncType=fstatSync', + 'statType=fstat', + 'withFileTypes=false', +], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-http.js b/test/benchmark/test-benchmark-http.js index a3d92c7e987f58..43531ec51cced7 100644 --- a/test/benchmark/test-benchmark-http.js +++ b/test/benchmark/test-benchmark-http.js @@ -11,4 +11,27 @@ if (!common.enoughTestMem) const runBenchmark = require('../common/benchmark'); -runBenchmark('http', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('http', + [ + 'benchmarker=test-double-http', + 'arg=string', + 'c=1', + 'chunkedEnc=true', + 'chunks=0', + 'dur=0.1', + 'e=0', + 'input=keep-alive', + 'key=""', + 'len=1', + 'method=write', + 'n=1', + 'res=normal', + 'type=asc', + 'url=long', + 'value=X-Powered-By', + 'w=0', + ], + { + NODEJS_BENCHMARK_ZERO_ALLOWED: 1, + duration: 0 + }); diff --git a/test/benchmark/test-benchmark-http2.js b/test/benchmark/test-benchmark-http2.js index 25dd771076e758..1668a7b87fe643 100644 --- a/test/benchmark/test-benchmark-http2.js +++ b/test/benchmark/test-benchmark-http2.js @@ -13,4 +13,17 @@ if (!common.enoughTestMem) const runBenchmark = require('../common/benchmark'); -runBenchmark('http2', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('http2', + [ + 'benchmarker=test-double-http2', + 'clients=1', + 'length=65536', + 'n=1', + 'nheaders=0', + 'requests=1', + 'streams=1' + ], + { + NODEJS_BENCHMARK_ZERO_ALLOWED: 1, + duration: 0 + }); diff --git a/test/benchmark/test-benchmark-misc.js b/test/benchmark/test-benchmark-misc.js index 30707bfaf7366e..13bd41e54016f5 100644 --- a/test/benchmark/test-benchmark-misc.js +++ b/test/benchmark/test-benchmark-misc.js @@ -4,4 +4,14 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('misc', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('misc', [ + 'concat=0', + 'dur=0.1', + 'method=', + 'n=1', + 'type=', + 'code=1', + 'val=magyarország.icom.museum', + 'script=test/fixtures/semicolon', + 'mode=worker' +], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-module.js b/test/benchmark/test-benchmark-module.js index da8e108d53e19f..4d49ed249c392f 100644 --- a/test/benchmark/test-benchmark-module.js +++ b/test/benchmark/test-benchmark-module.js @@ -4,4 +4,12 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('module'); +runBenchmark('module', [ + 'cache=true', + 'dir=rel', + 'ext=', + 'fullPath=true', + 'n=1', + 'name=/', + 'useCache=true', +]); diff --git a/test/benchmark/test-benchmark-napi.js b/test/benchmark/test-benchmark-napi.js index 5c6a8aa01187ea..1a1ff23d60c5c0 100644 --- a/test/benchmark/test-benchmark-napi.js +++ b/test/benchmark/test-benchmark-napi.js @@ -15,4 +15,10 @@ if (process.features.debug) { } const runBenchmark = require('../common/benchmark'); -runBenchmark('napi', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('napi', + [ + 'n=1', + 'engine=v8', + 'type=String' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-net.js b/test/benchmark/test-benchmark-net.js index df8ea8011693ee..f51c615b5df4f0 100644 --- a/test/benchmark/test-benchmark-net.js +++ b/test/benchmark/test-benchmark-net.js @@ -8,4 +8,13 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('net', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('net', + [ + 'dur=0', + 'len=1024', + 'recvbufgenfn=false', + 'recvbuflen=0', + 'sendchunklen=256', + 'type=buf' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-os.js b/test/benchmark/test-benchmark-os.js index dbedd7f582d90b..836e0e650483f1 100644 --- a/test/benchmark/test-benchmark-os.js +++ b/test/benchmark/test-benchmark-os.js @@ -4,4 +4,4 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('os'); +runBenchmark('os', ['n=1']); diff --git a/test/benchmark/test-benchmark-path.js b/test/benchmark/test-benchmark-path.js index 3bca4f2a11bd9d..890fd7ae41f548 100644 --- a/test/benchmark/test-benchmark-path.js +++ b/test/benchmark/test-benchmark-path.js @@ -4,4 +4,11 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('path', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('path', + [ + 'n=1', + 'path=', + 'pathext=', + 'paths=', + 'props=' + ], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-process.js b/test/benchmark/test-benchmark-process.js index c6687f3023412b..a73fc075bfcfa6 100644 --- a/test/benchmark/test-benchmark-process.js +++ b/test/benchmark/test-benchmark-process.js @@ -4,4 +4,9 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('process', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('process', + [ + 'n=1', + 'type=raw', + 'operation=enumerate', + ], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-querystring.js b/test/benchmark/test-benchmark-querystring.js index 6fee9bb39143ab..77d0ac99ff97d8 100644 --- a/test/benchmark/test-benchmark-querystring.js +++ b/test/benchmark/test-benchmark-querystring.js @@ -4,4 +4,9 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('querystring', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('querystring', + [ 'n=1', + 'input="there is nothing to unescape here"', + 'type=noencode' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-streams.js b/test/benchmark/test-benchmark-streams.js index 68c8478a7398c5..fa61b8dc4e0ae7 100644 --- a/test/benchmark/test-benchmark-streams.js +++ b/test/benchmark/test-benchmark-streams.js @@ -4,4 +4,13 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('streams', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('streams', + [ + 'kind=duplex', + 'n=1', + 'sync=no', + 'writev=no', + 'callback=no', + 'type=buffer', + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-string_decoder.js b/test/benchmark/test-benchmark-string_decoder.js index 721529e5ae64b1..f2fd6abe4b8f5f 100644 --- a/test/benchmark/test-benchmark-string_decoder.js +++ b/test/benchmark/test-benchmark-string_decoder.js @@ -4,4 +4,7 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('string_decoder'); +runBenchmark('string_decoder', ['chunkLen=16', + 'encoding=utf8', + 'inLen=32', + 'n=1']); diff --git a/test/benchmark/test-benchmark-timers.js b/test/benchmark/test-benchmark-timers.js index db4927ab32ea19..af3c49bd714742 100644 --- a/test/benchmark/test-benchmark-timers.js +++ b/test/benchmark/test-benchmark-timers.js @@ -4,4 +4,10 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('timers', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('timers', + [ + 'direction=start', + 'n=1', + 'type=depth', + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-tls.js b/test/benchmark/test-benchmark-tls.js index c9a87c15770d63..40c14af8302bdb 100644 --- a/test/benchmark/test-benchmark-tls.js +++ b/test/benchmark/test-benchmark-tls.js @@ -14,4 +14,16 @@ if (!common.enoughTestMem) const runBenchmark = require('../common/benchmark'); -runBenchmark('tls', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('tls', + [ + 'concurrency=1', + 'dur=0.1', + 'n=1', + 'size=2', + 'securing=SecurePair', + 'type=asc' + ], + { + NODEJS_BENCHMARK_ZERO_ALLOWED: 1, + duration: 0 + }); diff --git a/test/benchmark/test-benchmark-url.js b/test/benchmark/test-benchmark-url.js index 664e7c4d8dc827..8560c918fd1c69 100644 --- a/test/benchmark/test-benchmark-url.js +++ b/test/benchmark/test-benchmark-url.js @@ -4,4 +4,22 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('url', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('url', + [ + 'method=legacy', + 'e=0', + 'loopMethod=forEach', + 'accessMethod=get', + 'type=short', + 'searchParam=noencode', + 'href=short', + 'input=short', + 'domain=empty', + 'path=up', + 'to=ascii', + 'prop=href', + 'n=1', + 'param=one', + 'withBase=false' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-util.js b/test/benchmark/test-benchmark-util.js index d0c16c623268a6..b66d4fdb9b4cf6 100644 --- a/test/benchmark/test-benchmark-util.js +++ b/test/benchmark/test-benchmark-util.js @@ -4,4 +4,17 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('util', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('util', + ['argument=false', + 'input=', + 'method=Array', + 'n=1', + 'option=none', + 'pos=start', + 'size=1', + 'type=', + 'len=1', + 'version=native', + 'isProxy=1', + 'showProxy=1'], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-v8.js b/test/benchmark/test-benchmark-v8.js index efeaac8328c76d..22861785db9c05 100644 --- a/test/benchmark/test-benchmark-v8.js +++ b/test/benchmark/test-benchmark-v8.js @@ -4,4 +4,9 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('v8', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('v8', + [ + 'method=getHeapStatistics', + 'n=1' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-vm.js b/test/benchmark/test-benchmark-vm.js index e9c4e3f1389f69..79ab6a03402522 100644 --- a/test/benchmark/test-benchmark-vm.js +++ b/test/benchmark/test-benchmark-vm.js @@ -4,4 +4,10 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('vm', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('vm', + [ + 'breakOnSigint=0', + 'withSigintListener=0', + 'n=1' + ], + { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/benchmark/test-benchmark-worker.js b/test/benchmark/test-benchmark-worker.js index a4319d4face623..ae9a8a6701ae4a 100644 --- a/test/benchmark/test-benchmark-worker.js +++ b/test/benchmark/test-benchmark-worker.js @@ -11,4 +11,13 @@ if (!common.enoughTestMem) const runBenchmark = require('../common/benchmark'); -runBenchmark('worker', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('worker', + [ + 'n=1', + 'sendsPerBroadcast=1', + 'workers=1', + 'payload=string' + ], + { + NODEJS_BENCHMARK_ZERO_ALLOWED: 1 + }); diff --git a/test/benchmark/test-benchmark-zlib.js b/test/benchmark/test-benchmark-zlib.js index e3c4723aa9722f..adc7e3d47b040d 100644 --- a/test/benchmark/test-benchmark-zlib.js +++ b/test/benchmark/test-benchmark-zlib.js @@ -4,4 +4,17 @@ require('../common'); const runBenchmark = require('../common/benchmark'); -runBenchmark('zlib', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); +runBenchmark('zlib', + [ + 'algorithm=brotli', + 'chunkLen=1024', + 'duration=0.001', + 'inputLen=1024', + 'method=', + 'n=1', + 'options=true', + 'type=Deflate', + ], + { + 'NODEJS_BENCHMARK_ZERO_ALLOWED': 1 + });