From 7524871a9b97786dd07e4cb5d99233f97ade88cb Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 10 Feb 2023 00:15:52 +0100 Subject: [PATCH] benchmark: add trailing commas in `benchmark/http2` PR-URL: https://github.com/nodejs/node/pull/46552 Reviewed-By: Moshe Atlow Reviewed-By: Akhil Marsonya Reviewed-By: James M Snell Reviewed-By: Darshan Sen --- benchmark/.eslintrc.yaml | 1 - benchmark/http2/compat.js | 4 ++-- benchmark/http2/headers.js | 8 ++++---- benchmark/http2/respond-with-fd.js | 4 ++-- benchmark/http2/simple.js | 4 ++-- benchmark/http2/write.js | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index 4d1c749c8b58a2..18e63380b0d05d 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -11,7 +11,6 @@ overrides: - files: - crypto/*.js - http/*.js - - http2/*.js - path/*.js - url/*.js rules: diff --git a/benchmark/http2/compat.js b/benchmark/http2/compat.js index 9ca7ab1ba08ef7..d37bb20c5cddc1 100644 --- a/benchmark/http2/compat.js +++ b/benchmark/http2/compat.js @@ -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(); }); }); } diff --git a/benchmark/http2/headers.js b/benchmark/http2/headers.js index 886f64be1c8b7b..ab890dbbf2573f 100644 --- a/benchmark/http2/headers.js +++ b/benchmark/http2/headers.js @@ -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) { diff --git a/benchmark/http2/respond-with-fd.js b/benchmark/http2/respond-with-fd.js index 547b6900b61f48..c365c7cea136b5 100644 --- a/benchmark/http2/respond-with-fd.js +++ b/benchmark/http2/respond-with-fd.js @@ -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()); }); diff --git a/benchmark/http2/simple.js b/benchmark/http2/simple.js index d9ac513d3c3e68..5ee780ab98c7ec 100644 --- a/benchmark/http2/simple.js +++ b/benchmark/http2/simple.js @@ -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(); }); }); } diff --git a/benchmark/http2/write.js b/benchmark/http2/write.js index caf93e2f2b62d5..992e637c405679 100644 --- a/benchmark/http2/write.js +++ b/benchmark/http2/write.js @@ -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 }) {