Skip to content

Commit

Permalink
benchmark: add trailing commas in benchmark/fs
Browse files Browse the repository at this point in the history
PR-URL: #46426
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
  • Loading branch information
aduh95 authored and danielleadams committed Apr 3, 2023
1 parent b1bde69 commit f969cc3
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion benchmark/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ overrides:
- buffers/*.js
- buffers-fill/*.js
- crypto/*.js
- fs/*.js
- http/*.js
- http2/*.js
- misc/*.js
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-opendir.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-readdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-readdirSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
});


Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-stat-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const fs = require('fs');

const bench = common.createBenchmark(main, {
n: [20e4],
statType: ['fstat', 'lstat', 'stat']
statType: ['fstat', 'lstat', 'stat'],
});


Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-statSync-failure.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const path = require('path');

const bench = common.createBenchmark(main, {
n: [1e6],
statSyncType: ['throw', 'noThrow']
statSyncType: ['throw', 'noThrow'],
});


Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-statSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const fs = require('fs');

const bench = common.createBenchmark(main, {
n: [1e6],
statSyncType: ['fstatSync', 'lstatSync', 'statSync']
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
});


Expand Down
4 changes: 2 additions & 2 deletions benchmark/fs/read-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/readFileSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/readfile-partitioned.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/readfile-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/readfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/write-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/writefile-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down

0 comments on commit f969cc3

Please sign in to comment.