Skip to content

Commit a10c355

Browse files
aduh95danielleadams
authored andcommitted
benchmark: add trailing commas in benchmark/http2
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]>
1 parent 9567436 commit a10c355

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

benchmark/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ overrides:
1111
- files:
1212
- crypto/*.js
1313
- http/*.js
14-
- http2/*.js
1514
- path/*.js
1615
- url/*.js
1716
rules:

benchmark/http2/compat.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
1010
streams: [1, 10, 20, 40, 100, 200],
1111
clients: [2],
1212
benchmarker: ['test-double-http2'],
13-
duration: 5
13+
duration: 5,
1414
}, { flags: ['--no-warnings'] });
1515

1616
function main({ requests, streams, clients, duration }) {
@@ -32,7 +32,7 @@ function main({ requests, streams, clients, duration }) {
3232
maxConcurrentStreams: streams,
3333
clients,
3434
threads: clients,
35-
duration
35+
duration,
3636
}, () => { server.close(); });
3737
});
3838
}

benchmark/http2/headers.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const common = require('../common.js');
44

55
const bench = common.createBenchmark(main, {
66
n: [1e3],
7-
nheaders: [0, 10, 100, 1000]
7+
nheaders: [0, 10, 100, 1000],
88
}, { flags: ['--no-warnings'] });
99

1010
function main({ n, nheaders }) {
1111
const http2 = require('http2');
1212
const server = http2.createServer({
13-
maxHeaderListPairs: 20000
13+
maxHeaderListPairs: 20000,
1414
});
1515

1616
const headersObject = {
@@ -20,7 +20,7 @@ function main({ n, nheaders }) {
2020
'accept-language': 'en',
2121
'content-type': 'text/plain',
2222
'referer': 'https://example.org/',
23-
'user-agent': 'SuperBenchmarker 3000'
23+
'user-agent': 'SuperBenchmarker 3000',
2424
};
2525

2626
for (let i = 0; i < nheaders; i++) {
@@ -33,7 +33,7 @@ function main({ n, nheaders }) {
3333
});
3434
server.listen(0, () => {
3535
const client = http2.connect(`http://localhost:${server.address().port}/`, {
36-
maxHeaderListPairs: 20000
36+
maxHeaderListPairs: 20000,
3737
});
3838

3939
function doRequest(remaining) {

benchmark/http2/respond-with-fd.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, {
1111
streams: [1, 10, 20, 40, 100, 200],
1212
clients: [2],
1313
benchmarker: ['test-double-http2'],
14-
duration: 5
14+
duration: 5,
1515
}, { flags: ['--no-warnings'] });
1616

1717
function main({ requests, streams, clients, duration }) {
@@ -33,7 +33,7 @@ function main({ requests, streams, clients, duration }) {
3333
maxConcurrentStreams: streams,
3434
clients,
3535
duration,
36-
threads: clients
36+
threads: clients,
3737
}, () => server.close());
3838
});
3939

benchmark/http2/simple.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
1010
streams: [1, 10, 20, 40, 100, 200],
1111
clients: [2],
1212
benchmarker: ['test-double-http2'],
13-
duration: 5
13+
duration: 5,
1414
}, { flags: ['--no-warnings'] });
1515

1616
function main({ requests, streams, clients, duration }) {
@@ -30,7 +30,7 @@ function main({ requests, streams, clients, duration }) {
3030
maxConcurrentStreams: streams,
3131
clients,
3232
duration,
33-
threads: clients
33+
threads: clients,
3434
}, () => { server.close(); });
3535
});
3636
}

benchmark/http2/write.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
77
length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
88
size: [100000],
99
benchmarker: ['test-double-http2'],
10-
duration: 5
10+
duration: 5,
1111
}, { flags: ['--no-warnings'] });
1212

1313
function main({ streams, length, size, duration }) {

0 commit comments

Comments
 (0)