Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 524eec7

Browse filesBrowse files
aduh95ruyadorno
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 c38673d commit 524eec7
Copy full SHA for 524eec7

File tree

Expand file treeCollapse file tree

83 files changed

+133
-115
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

83 files changed

+133
-115
lines changed
Open diff view settings
Collapse file

‎benchmark/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: benchmark/.eslintrc.yaml
+25-7Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,29 @@ env:
55
es6: true
66

77
rules:
8-
comma-dangle: [error, {
9-
arrays: always-multiline,
10-
exports: always-multiline,
11-
functions: only-multiline,
12-
imports: always-multiline,
13-
objects: only-multiline,
14-
}]
158
prefer-arrow-callback: error
9+
10+
overrides:
11+
- files:
12+
- async_hooks/*.js
13+
- buffers/*.js
14+
- buffers-fill/*.js
15+
- crypto/*.js
16+
- fs/*.js
17+
- http/*.js
18+
- http2/*.js
19+
- misc/*.js
20+
- module/*.js
21+
- net/*.js
22+
- path/*.js
23+
- process/*.js
24+
- url/*.js
25+
- util/*.js
26+
rules:
27+
comma-dangle: [error, {
28+
arrays: always-multiline,
29+
exports: always-multiline,
30+
functions: only-multiline,
31+
imports: always-multiline,
32+
objects: only-multiline,
33+
}]
Collapse file

‎benchmark/_http-benchmarkers.js‎

Copy file name to clipboardExpand all lines: benchmark/_http-benchmarkers.js
+2-2Lines 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 ' +
Collapse file

‎benchmark/assert/deepequal-map.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-map.js
+2-2Lines 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];
Collapse file

‎benchmark/blob/blob.js‎

Copy file name to clipboardExpand all lines: benchmark/blob/blob.js
+1-1Lines 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) {
Collapse file

‎benchmark/blob/file.js‎

Copy file name to clipboardExpand all lines: benchmark/blob/file.js
+1-1Lines 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 = {
Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-exec-stdout.js
+1-1Lines 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 }) {
Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-read-ipc.js
+1-1Lines 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

Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-read.js
+1-1Lines 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 }) {
Collapse file

‎benchmark/child_process/spawn-echo.js‎

Copy file name to clipboardExpand all lines: benchmark/child_process/spawn-echo.js
+1-1Lines 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;
Collapse file

‎benchmark/cluster/echo.js‎

Copy file name to clipboardExpand all lines: benchmark/cluster/echo.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ if (cluster.isMaster) {
88
payload: ['string', 'object'],
99
sendsPerBroadcast: [1, 10],
1010
serialization: ['json', 'advanced'],
11-
n: [1e5]
11+
n: [1e5],
1212
});
1313

1414
function main({
1515
n,
1616
workers,
1717
sendsPerBroadcast,
1818
payload,
19-
serialization
19+
serialization,
2020
}) {
2121
const expectedPerBroadcast = sendsPerBroadcast * workers;
2222
let readies = 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.