Skip to content

Commit f969cc3

Browse files
aduh95danielleadams
authored andcommitted
benchmark: add trailing commas in benchmark/fs
PR-URL: #46426 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]>
1 parent b1bde69 commit f969cc3

15 files changed

+15
-16
lines changed

benchmark/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ overrides:
1313
- buffers/*.js
1414
- buffers-fill/*.js
1515
- crypto/*.js
16-
- fs/*.js
1716
- http/*.js
1817
- http2/*.js
1918
- misc/*.js

benchmark/fs/bench-opendir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
n: [100],
99
dir: [ 'lib', 'test/parallel'],
1010
mode: [ 'async', 'sync', 'callback' ],
11-
bufferSize: [ 4, 32, 1024 ]
11+
bufferSize: [ 4, 32, 1024 ],
1212
});
1313

1414
async function main({ n, dir, mode, bufferSize }) {

benchmark/fs/bench-readdir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const path = require('path');
77
const bench = common.createBenchmark(main, {
88
n: [10],
99
dir: [ 'lib', 'test/parallel'],
10-
withFileTypes: ['true', 'false']
10+
withFileTypes: ['true', 'false'],
1111
});
1212

1313
function main({ n, dir, withFileTypes }) {

benchmark/fs/bench-readdirSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const path = require('path');
77
const bench = common.createBenchmark(main, {
88
n: [10],
99
dir: [ 'lib', 'test/parallel'],
10-
withFileTypes: ['true', 'false']
10+
withFileTypes: ['true', 'false'],
1111
});
1212

1313

benchmark/fs/bench-stat-promise.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fsPromises = require('fs').promises;
55

66
const bench = common.createBenchmark(main, {
77
n: [20e4],
8-
statType: ['fstat', 'lstat', 'stat']
8+
statType: ['fstat', 'lstat', 'stat'],
99
});
1010

1111
async function run(n, statType) {

benchmark/fs/bench-stat.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('fs');
55

66
const bench = common.createBenchmark(main, {
77
n: [20e4],
8-
statType: ['fstat', 'lstat', 'stat']
8+
statType: ['fstat', 'lstat', 'stat'],
99
});
1010

1111

benchmark/fs/bench-statSync-failure.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path');
66

77
const bench = common.createBenchmark(main, {
88
n: [1e6],
9-
statSyncType: ['throw', 'noThrow']
9+
statSyncType: ['throw', 'noThrow'],
1010
});
1111

1212

benchmark/fs/bench-statSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('fs');
55

66
const bench = common.createBenchmark(main, {
77
n: [1e6],
8-
statSyncType: ['fstatSync', 'lstatSync', 'statSync']
8+
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
99
});
1010

1111

benchmark/fs/read-stream-throughput.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, {
1515
encodingType: ['buf', 'asc', 'utf'],
1616
filesize: [1000 * 1024],
1717
highWaterMark: [1024, 4096, 65535, 1024 * 1024],
18-
n: 1024
18+
n: 1024,
1919
});
2020

2121
function main(conf) {
@@ -72,7 +72,7 @@ function runTest(filesize, highWaterMark, encoding, n) {
7272
assert(fs.statSync(filename).size === filesize * n);
7373
const rs = fs.createReadStream(filename, {
7474
highWaterMark,
75-
encoding
75+
encoding,
7676
});
7777

7878
rs.on('open', () => {

benchmark/fs/readFileSync.js

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

66
const bench = common.createBenchmark(main, {
7-
n: [60e4]
7+
n: [60e4],
88
});
99

1010
function main({ n }) {

benchmark/fs/readfile-partitioned.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const bench = common.createBenchmark(main, {
2020
duration: [5],
2121
encoding: ['', 'utf-8'],
2222
len: [1024, 16 * 1024 * 1024],
23-
concurrent: [1, 10]
23+
concurrent: [1, 10],
2424
});
2525

2626
function main({ len, duration, concurrent, encoding }) {

benchmark/fs/readfile-promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const bench = common.createBenchmark(main, {
2424
16 * 1024 ** 2,
2525
32 * 1024 ** 2,
2626
],
27-
concurrent: [1, 10]
27+
concurrent: [1, 10],
2828
});
2929

3030
function main({ len, duration, concurrent, encoding }) {

benchmark/fs/readfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
1717
duration: [5],
1818
encoding: ['', 'utf-8'],
1919
len: [1024, 16 * 1024 * 1024],
20-
concurrent: [1, 10]
20+
concurrent: [1, 10],
2121
});
2222

2323
function main({ len, duration, concurrent, encoding }) {

benchmark/fs/write-stream-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const filename = path.resolve(tmpdir.path,
1313
const bench = common.createBenchmark(main, {
1414
dur: [5],
1515
encodingType: ['buf', 'asc', 'utf'],
16-
size: [2, 1024, 65535, 1024 * 1024]
16+
size: [2, 1024, 65535, 1024 * 1024],
1717
});
1818

1919
function main({ dur, encodingType, size }) {

benchmark/fs/writefile-promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
1717
duration: [5],
1818
encodingType: ['buf', 'asc', 'utf'],
1919
size: [2, 1024, 65535, 1024 * 1024],
20-
concurrent: [1, 10]
20+
concurrent: [1, 10],
2121
});
2222

2323
function main({ encodingType, duration, concurrent, size }) {

0 commit comments

Comments
 (0)