benchmark: add trailing commas · nodejs/node@6f91c8e · GitHub
Skip to content

Commit 6f91c8e

Browse files
aduh95juanarbol
authored andcommitted
benchmark: add trailing commas
PR-URL: #46370 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 92f0747 commit 6f91c8e

83 files changed

Lines changed: 133 additions & 115 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

benchmark/.eslintrc.yaml

Lines changed: 25 additions & 7 deletions

benchmark/_http-benchmarkers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class TestDoubleBenchmarker {
106106
const scheme = options.scheme || 'http';
107107
const env = {
108108
test_url: `${scheme}://127.0.0.1:${options.port}${options.path}`,
109-
...process.env
109+
...process.env,
110110
};
111111

112112
const child = child_process.fork(this.executable,
@@ -203,7 +203,7 @@ exports.run = function(options, callback) {
203203
connections: 100,
204204
duration: 5,
205205
benchmarker: exports.default_http_benchmarker,
206-
...options
206+
...options,
207207
};
208208
if (!options.benchmarker) {
209209
callback(new Error('Could not locate required http benchmarker. See ' +

benchmark/assert/deepequal-map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function main({ n, len, method, strict }) {
4646
}
4747
case 'deepEqual_mixed': {
4848
const values = array.map(
49-
(_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]
49+
(_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123],
5050
);
5151
benchmark(strict ? deepStrictEqual : deepEqual, n, values);
5252
break;
@@ -67,7 +67,7 @@ function main({ n, len, method, strict }) {
6767
}
6868
case 'notDeepEqual_mixed': {
6969
const values = array.map(
70-
(_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]
70+
(_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123],
7171
);
7272
const values2 = values.slice(0);
7373
values2[0] = ['w00t', 123];

benchmark/blob/blob.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { Blob } = require('buffer');
55
const bench = common.createBenchmark(main, {
66
bytes: [128, 1024, 1024 ** 2],
77
n: [1e6],
8-
operation: ['text', 'arrayBuffer']
8+
operation: ['text', 'arrayBuffer'],
99
});
1010

1111
async function run(n, bytes, operation) {

benchmark/blob/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { File } = require('buffer');
55
const bench = common.createBenchmark(main, {
66
bytes: [128, 1024, 1024 ** 2],
77
n: [1e6],
8-
operation: ['text', 'arrayBuffer']
8+
operation: ['text', 'arrayBuffer'],
99
});
1010

1111
const options = {

benchmark/child_process/child-process-exec-stdout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (!isWindows) messagesLength.push(32768);
99

1010
const bench = common.createBenchmark(childProcessExecStdout, {
1111
len: messagesLength,
12-
dur: [5]
12+
dur: [5],
1313
});
1414

1515
function childProcessExecStdout({ dur, len }) {

benchmark/child_process/child-process-read-ipc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (process.argv[2] === 'child') {
1515
64, 256, 1024, 4096, 16384, 65536,
1616
65536 << 4, 65536 << 6 - 1,
1717
],
18-
dur: [5]
18+
dur: [5],
1919
});
2020
const spawn = require('child_process').spawn;
2121

benchmark/child_process/child-process-read.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (os.platform() !== 'win32')
1414

1515
const bench = common.createBenchmark(main, {
1616
len: messagesLength,
17-
dur: [5]
17+
dur: [5],
1818
});
1919

2020
function main({ dur, len }) {

benchmark/child_process/spawn-echo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../common.js');
33
const bench = common.createBenchmark(main, {
4-
n: [1000]
4+
n: [1000],
55
});
66

77
const spawn = require('child_process').spawn;

benchmark/cluster/echo.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)