Skip to content

Commit

Permalink
benchmark: add trailing commas in benchmark/http2
Browse files Browse the repository at this point in the history
PR-URL: #46552
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
aduh95 authored and MylesBorins committed Feb 18, 2023
1 parent 31fb2e2 commit 7524871
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion benchmark/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ overrides:
- files:
- crypto/*.js
- http/*.js
- http2/*.js
- path/*.js
- url/*.js
rules:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -32,7 +32,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
threads: clients,
duration
duration,
}, () => { server.close(); });
});
}
8 changes: 4 additions & 4 deletions benchmark/http2/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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++) {
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/http2/respond-with-fd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -33,7 +33,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
duration,
threads: clients
threads: clients,
}, () => server.close());
});

Expand Down
4 changes: 2 additions & 2 deletions benchmark/http2/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -30,7 +30,7 @@ function main({ requests, streams, clients, duration }) {
maxConcurrentStreams: streams,
clients,
duration,
threads: clients
threads: clients,
}, () => { server.close(); });
});
}
2 changes: 1 addition & 1 deletion benchmark/http2/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down

0 comments on commit 7524871

Please sign in to comment.