Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: add trailing commas in benchmark/http2 #46552

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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