benchmark: add trailing commas in `benchmark/http2`

PR-URL: https://github.com/nodejs/node/pull/46552
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Antoine du Hamel 2023-02-10 00:15:52 +01:00 committed by GitHub
parent 5092346439
commit 71646e2eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 12 deletions

View File

@ -11,7 +11,6 @@ overrides:
- files:
- crypto/*.js
- http/*.js
- http2/*.js
- path/*.js
- url/*.js
rules:

View File

@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
streams: [1, 10, 20, 40, 100, 200],
clients: [2],
benchmarker: ['test-double-http2'],
duration: 5
duration: 5,
}, { flags: ['--no-warnings'] });
function main({ requests, streams, clients, duration }) {
@ -32,7 +32,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
threads: clients,
duration
duration,
}, () => { server.close(); });
});
}

View File

@ -4,13 +4,13 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [1e3],
nheaders: [0, 10, 100, 1000]
nheaders: [0, 10, 100, 1000],
}, { flags: ['--no-warnings'] });
function main({ n, nheaders }) {
const http2 = require('http2');
const server = http2.createServer({
maxHeaderListPairs: 20000
maxHeaderListPairs: 20000,
});
const headersObject = {
@ -20,7 +20,7 @@ function main({ n, nheaders }) {
'accept-language': 'en',
'content-type': 'text/plain',
'referer': 'https://example.org/',
'user-agent': 'SuperBenchmarker 3000'
'user-agent': 'SuperBenchmarker 3000',
};
for (let i = 0; i < nheaders; i++) {
@ -33,7 +33,7 @@ function main({ n, nheaders }) {
});
server.listen(0, () => {
const client = http2.connect(`http://localhost:${server.address().port}/`, {
maxHeaderListPairs: 20000
maxHeaderListPairs: 20000,
});
function doRequest(remaining) {

View File

@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, {
streams: [1, 10, 20, 40, 100, 200],
clients: [2],
benchmarker: ['test-double-http2'],
duration: 5
duration: 5,
}, { flags: ['--no-warnings'] });
function main({ requests, streams, clients, duration }) {
@ -33,7 +33,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
duration,
threads: clients
threads: clients,
}, () => server.close());
});

View File

@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
streams: [1, 10, 20, 40, 100, 200],
clients: [2],
benchmarker: ['test-double-http2'],
duration: 5
duration: 5,
}, { flags: ['--no-warnings'] });
function main({ requests, streams, clients, duration }) {
@ -30,7 +30,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
duration,
threads: clients
threads: clients,
}, () => { server.close(); });
});
}

View File

@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
size: [100000],
benchmarker: ['test-double-http2'],
duration: 5
duration: 5,
}, { flags: ['--no-warnings'] });
function main({ streams, length, size, duration }) {