benchmark: add trailing commas in benchmark/fs

PR-URL: https://github.com/nodejs/node/pull/46426
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
This commit is contained in:
Antoine du Hamel 2023-02-01 20:16:18 +01:00 committed by GitHub
parent dc90810f9f
commit 9e5d1af3ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 15 additions and 16 deletions

View file

@ -13,7 +13,6 @@ overrides:
- buffers/*.js
- buffers-fill/*.js
- crypto/*.js
- fs/*.js
- http/*.js
- http2/*.js
- misc/*.js

View file

@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
n: [100],
dir: [ 'lib', 'test/parallel'],
mode: [ 'async', 'sync', 'callback' ],
bufferSize: [ 4, 32, 1024 ]
bufferSize: [ 4, 32, 1024 ],
});
async function main({ n, dir, mode, bufferSize }) {

View file

@ -7,7 +7,7 @@ const path = require('path');
const bench = common.createBenchmark(main, {
n: [10],
dir: [ 'lib', 'test/parallel'],
withFileTypes: ['true', 'false']
withFileTypes: ['true', 'false'],
});
function main({ n, dir, withFileTypes }) {

View file

@ -7,7 +7,7 @@ const path = require('path');
const bench = common.createBenchmark(main, {
n: [10],
dir: [ 'lib', 'test/parallel'],
withFileTypes: ['true', 'false']
withFileTypes: ['true', 'false'],
});

View file

@ -5,7 +5,7 @@ const fsPromises = require('fs').promises;
const bench = common.createBenchmark(main, {
n: [20e4],
statType: ['fstat', 'lstat', 'stat']
statType: ['fstat', 'lstat', 'stat'],
});
async function run(n, statType) {

View file

@ -5,7 +5,7 @@ const fs = require('fs');
const bench = common.createBenchmark(main, {
n: [20e4],
statType: ['fstat', 'lstat', 'stat']
statType: ['fstat', 'lstat', 'stat'],
});

View file

@ -6,7 +6,7 @@ const path = require('path');
const bench = common.createBenchmark(main, {
n: [1e6],
statSyncType: ['throw', 'noThrow']
statSyncType: ['throw', 'noThrow'],
});

View file

@ -5,7 +5,7 @@ const fs = require('fs');
const bench = common.createBenchmark(main, {
n: [1e6],
statSyncType: ['fstatSync', 'lstatSync', 'statSync']
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
});

View file

@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, {
encodingType: ['buf', 'asc', 'utf'],
filesize: [1000 * 1024],
highWaterMark: [1024, 4096, 65535, 1024 * 1024],
n: 1024
n: 1024,
});
function main(conf) {
@ -72,7 +72,7 @@ function runTest(filesize, highWaterMark, encoding, n) {
assert(fs.statSync(filename).size === filesize * n);
const rs = fs.createReadStream(filename, {
highWaterMark,
encoding
encoding,
});
rs.on('open', () => {

View file

@ -4,7 +4,7 @@ const common = require('../common.js');
const fs = require('fs');
const bench = common.createBenchmark(main, {
n: [60e4]
n: [60e4],
});
function main({ n }) {

View file

@ -20,7 +20,7 @@ const bench = common.createBenchmark(main, {
duration: [5],
encoding: ['', 'utf-8'],
len: [1024, 16 * 1024 * 1024],
concurrent: [1, 10]
concurrent: [1, 10],
});
function main({ len, duration, concurrent, encoding }) {

View file

@ -24,7 +24,7 @@ const bench = common.createBenchmark(main, {
16 * 1024 ** 2,
32 * 1024 ** 2,
],
concurrent: [1, 10]
concurrent: [1, 10],
});
function main({ len, duration, concurrent, encoding }) {

View file

@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
duration: [5],
encoding: ['', 'utf-8'],
len: [1024, 16 * 1024 * 1024],
concurrent: [1, 10]
concurrent: [1, 10],
});
function main({ len, duration, concurrent, encoding }) {

View file

@ -13,7 +13,7 @@ const filename = path.resolve(tmpdir.path,
const bench = common.createBenchmark(main, {
dur: [5],
encodingType: ['buf', 'asc', 'utf'],
size: [2, 1024, 65535, 1024 * 1024]
size: [2, 1024, 65535, 1024 * 1024],
});
function main({ dur, encodingType, size }) {

View file

@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
duration: [5],
encodingType: ['buf', 'asc', 'utf'],
size: [2, 1024, 65535, 1024 * 1024],
concurrent: [1, 10]
concurrent: [1, 10],
});
function main({ encodingType, duration, concurrent, size }) {