mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: refactor all benchmark tests to use the new test option
PR-URL: https://github.com/nodejs/node/pull/31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
dac579516c
commit
78aa348f4e
@ -7,15 +7,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark(
|
||||
'assert',
|
||||
[
|
||||
'strict=1',
|
||||
'len=1',
|
||||
'method=',
|
||||
'n=1',
|
||||
'primitive=null',
|
||||
'size=1',
|
||||
'type=Int8Array'
|
||||
]
|
||||
);
|
||||
runBenchmark('assert');
|
||||
|
@ -10,11 +10,4 @@ if (!common.enoughTestMem)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('async_hooks',
|
||||
[
|
||||
'asyncHooks=all',
|
||||
'connections=50',
|
||||
'method=trackingDisabled',
|
||||
'n=10'
|
||||
],
|
||||
{});
|
||||
runBenchmark('async_hooks');
|
||||
|
@ -4,30 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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 });
|
||||
runBenchmark('buffers', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,12 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('child_process',
|
||||
[
|
||||
'dur=0',
|
||||
'n=1',
|
||||
'len=1',
|
||||
'params=1',
|
||||
'methodName=execSync',
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('child_process', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,9 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('cluster', [
|
||||
'n=1',
|
||||
'payload=string',
|
||||
'sendsPerBroadcast=1',
|
||||
'serialization=json',
|
||||
]);
|
||||
runBenchmark('cluster');
|
||||
|
@ -10,18 +10,4 @@ if (common.hasFipsCrypto)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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 });
|
||||
runBenchmark('crypto', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,14 +4,7 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
// 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.
|
||||
// Dgram benchmarks use hardcoded ports. Thus, this test can not be run in
|
||||
// parallel with tests that choose random ports.
|
||||
|
||||
runBenchmark('dgram', ['address=true',
|
||||
'chunks=2',
|
||||
'dur=0.1',
|
||||
'len=1',
|
||||
'n=1',
|
||||
'num=1',
|
||||
'type=send']);
|
||||
runBenchmark('dgram');
|
||||
|
@ -4,6 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
const env = { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 };
|
||||
|
||||
runBenchmark('dns', ['n=1', 'all=false', 'name=127.0.0.1'], env);
|
||||
runBenchmark('dns', { ...process.env, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,4 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('domain', ['n=1', 'args=0']);
|
||||
runBenchmark('domain');
|
||||
|
@ -4,15 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('es',
|
||||
[
|
||||
'method=',
|
||||
'count=1',
|
||||
'context=null',
|
||||
'rest=0',
|
||||
'mode=',
|
||||
'n=1',
|
||||
'encoding=ascii',
|
||||
'size=1e1'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('es', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,6 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('events',
|
||||
['argc=0', 'listeners=1', 'n=1'],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('events', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -6,19 +6,4 @@ const runBenchmark = require('../common/benchmark');
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
tmpdir.refresh();
|
||||
|
||||
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 });
|
||||
runBenchmark('fs', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -11,27 +11,4 @@ if (!common.enoughTestMem)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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
|
||||
});
|
||||
runBenchmark('http', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -13,17 +13,4 @@ if (!common.enoughTestMem)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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
|
||||
});
|
||||
runBenchmark('http2', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,14 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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 });
|
||||
runBenchmark('misc', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,12 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('module', [
|
||||
'cache=true',
|
||||
'dir=rel',
|
||||
'ext=',
|
||||
'fullPath=true',
|
||||
'n=1',
|
||||
'name=/',
|
||||
'useCache=true',
|
||||
]);
|
||||
runBenchmark('module');
|
||||
|
@ -15,10 +15,4 @@ if (process.features.debug) {
|
||||
}
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('napi',
|
||||
[
|
||||
'n=1',
|
||||
'engine=v8',
|
||||
'type=String'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('napi', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -8,13 +8,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('net',
|
||||
[
|
||||
'dur=0',
|
||||
'len=1024',
|
||||
'recvbufgenfn=false',
|
||||
'recvbuflen=0',
|
||||
'sendchunklen=256',
|
||||
'type=buf'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('net', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,4 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('os', ['n=1']);
|
||||
runBenchmark('os');
|
||||
|
@ -4,11 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('path',
|
||||
[
|
||||
'n=1',
|
||||
'path=',
|
||||
'pathext=',
|
||||
'paths=',
|
||||
'props='
|
||||
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('path', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,9 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('process',
|
||||
[
|
||||
'n=1',
|
||||
'type=raw',
|
||||
'operation=enumerate',
|
||||
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('process', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,9 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('querystring',
|
||||
[ 'n=1',
|
||||
'input="there is nothing to unescape here"',
|
||||
'type=noencode'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('querystring', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,13 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('streams',
|
||||
[
|
||||
'kind=duplex',
|
||||
'n=1',
|
||||
'sync=no',
|
||||
'writev=no',
|
||||
'callback=no',
|
||||
'type=buffer',
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('streams', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,7 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('string_decoder', ['chunkLen=16',
|
||||
'encoding=utf8',
|
||||
'inLen=32',
|
||||
'n=1']);
|
||||
runBenchmark('string_decoder');
|
||||
|
@ -4,10 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('timers',
|
||||
[
|
||||
'direction=start',
|
||||
'n=1',
|
||||
'type=depth',
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('timers', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -14,16 +14,4 @@ if (!common.enoughTestMem)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('tls',
|
||||
[
|
||||
'concurrency=1',
|
||||
'dur=0.1',
|
||||
'n=1',
|
||||
'size=2',
|
||||
'securing=SecurePair',
|
||||
'type=asc'
|
||||
],
|
||||
{
|
||||
NODEJS_BENCHMARK_ZERO_ALLOWED: 1,
|
||||
duration: 0
|
||||
});
|
||||
runBenchmark('tls', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,22 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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 });
|
||||
runBenchmark('url', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,17 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
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 });
|
||||
runBenchmark('util', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,9 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('v8',
|
||||
[
|
||||
'method=getHeapStatistics',
|
||||
'n=1'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('v8', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,10 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('vm',
|
||||
[
|
||||
'breakOnSigint=0',
|
||||
'withSigintListener=0',
|
||||
'n=1'
|
||||
],
|
||||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
runBenchmark('vm', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -11,13 +11,4 @@ if (!common.enoughTestMem)
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('worker',
|
||||
[
|
||||
'n=1',
|
||||
'sendsPerBroadcast=1',
|
||||
'workers=1',
|
||||
'payload=string'
|
||||
],
|
||||
{
|
||||
NODEJS_BENCHMARK_ZERO_ALLOWED: 1
|
||||
});
|
||||
runBenchmark('worker', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
@ -4,17 +4,4 @@ require('../common');
|
||||
|
||||
const runBenchmark = require('../common/benchmark');
|
||||
|
||||
runBenchmark('zlib',
|
||||
[
|
||||
'algorithm=brotli',
|
||||
'chunkLen=1024',
|
||||
'duration=0.001',
|
||||
'inputLen=1024',
|
||||
'method=',
|
||||
'n=1',
|
||||
'options=true',
|
||||
'type=Deflate',
|
||||
],
|
||||
{
|
||||
'NODEJS_BENCHMARK_ZERO_ALLOWED': 1
|
||||
});
|
||||
runBenchmark('zlib', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||
|
Loading…
Reference in New Issue
Block a user