From 988ee0a5181d81033269c090ef98998ef484f8c6 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 30 Jan 2023 10:01:12 +0100 Subject: [PATCH] benchmark: add trailing commas in `benchmark/fs` --- benchmark/.eslintrc.yaml | 1 - benchmark/fs/bench-opendir.js | 2 +- benchmark/fs/bench-readdir.js | 2 +- benchmark/fs/bench-readdirSync.js | 2 +- benchmark/fs/bench-stat-promise.js | 2 +- benchmark/fs/bench-stat.js | 2 +- benchmark/fs/bench-statSync-failure.js | 2 +- benchmark/fs/bench-statSync.js | 2 +- benchmark/fs/read-stream-throughput.js | 4 ++-- benchmark/fs/readFileSync.js | 2 +- benchmark/fs/readfile-partitioned.js | 2 +- benchmark/fs/readfile-promises.js | 2 +- benchmark/fs/readfile.js | 2 +- benchmark/fs/write-stream-throughput.js | 2 +- benchmark/fs/writefile-promises.js | 2 +- 15 files changed, 15 insertions(+), 16 deletions(-) diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index f7325c20e7c870..4b88c8eedadd1e 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -13,7 +13,6 @@ overrides: - buffers/*.js - buffers-fill/*.js - crypto/*.js - - fs/*.js - http/*.js - http2/*.js - misc/*.js diff --git a/benchmark/fs/bench-opendir.js b/benchmark/fs/bench-opendir.js index 20e178d9cc5236..77ea471fa5480f 100644 --- a/benchmark/fs/bench-opendir.js +++ b/benchmark/fs/bench-opendir.js @@ -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 }) { diff --git a/benchmark/fs/bench-readdir.js b/benchmark/fs/bench-readdir.js index 3731e35a5436f4..8fa0e7a3cbdc05 100644 --- a/benchmark/fs/bench-readdir.js +++ b/benchmark/fs/bench-readdir.js @@ -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 }) { diff --git a/benchmark/fs/bench-readdirSync.js b/benchmark/fs/bench-readdirSync.js index c0144d3460f8ff..8ae1d061d1f153 100644 --- a/benchmark/fs/bench-readdirSync.js +++ b/benchmark/fs/bench-readdirSync.js @@ -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'], }); diff --git a/benchmark/fs/bench-stat-promise.js b/benchmark/fs/bench-stat-promise.js index 99a5da5799b787..4429664f2dba76 100644 --- a/benchmark/fs/bench-stat-promise.js +++ b/benchmark/fs/bench-stat-promise.js @@ -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) { diff --git a/benchmark/fs/bench-stat.js b/benchmark/fs/bench-stat.js index e1f51c762c8e5f..1441907e18cd78 100644 --- a/benchmark/fs/bench-stat.js +++ b/benchmark/fs/bench-stat.js @@ -5,7 +5,7 @@ const fs = require('fs'); const bench = common.createBenchmark(main, { n: [20e4], - statType: ['fstat', 'lstat', 'stat'] + statType: ['fstat', 'lstat', 'stat'], }); diff --git a/benchmark/fs/bench-statSync-failure.js b/benchmark/fs/bench-statSync-failure.js index dd69259eacd07e..de6128d8fc1845 100644 --- a/benchmark/fs/bench-statSync-failure.js +++ b/benchmark/fs/bench-statSync-failure.js @@ -6,7 +6,7 @@ const path = require('path'); const bench = common.createBenchmark(main, { n: [1e6], - statSyncType: ['throw', 'noThrow'] + statSyncType: ['throw', 'noThrow'], }); diff --git a/benchmark/fs/bench-statSync.js b/benchmark/fs/bench-statSync.js index e75d6603fcfc64..4ec2e860fb6ba7 100644 --- a/benchmark/fs/bench-statSync.js +++ b/benchmark/fs/bench-statSync.js @@ -5,7 +5,7 @@ const fs = require('fs'); const bench = common.createBenchmark(main, { n: [1e6], - statSyncType: ['fstatSync', 'lstatSync', 'statSync'] + statSyncType: ['fstatSync', 'lstatSync', 'statSync'], }); diff --git a/benchmark/fs/read-stream-throughput.js b/benchmark/fs/read-stream-throughput.js index d4a0a798409a12..ecdf09bdf3f169 100644 --- a/benchmark/fs/read-stream-throughput.js +++ b/benchmark/fs/read-stream-throughput.js @@ -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', () => { diff --git a/benchmark/fs/readFileSync.js b/benchmark/fs/readFileSync.js index 47d210b7aa0463..8cf3b4c28fb25c 100644 --- a/benchmark/fs/readFileSync.js +++ b/benchmark/fs/readFileSync.js @@ -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 }) { diff --git a/benchmark/fs/readfile-partitioned.js b/benchmark/fs/readfile-partitioned.js index e0ca7a2c1bbdbe..b0183709e9f1e9 100644 --- a/benchmark/fs/readfile-partitioned.js +++ b/benchmark/fs/readfile-partitioned.js @@ -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 }) { diff --git a/benchmark/fs/readfile-promises.js b/benchmark/fs/readfile-promises.js index af14509e710f7a..0abe907cdde9ab 100644 --- a/benchmark/fs/readfile-promises.js +++ b/benchmark/fs/readfile-promises.js @@ -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 }) { diff --git a/benchmark/fs/readfile.js b/benchmark/fs/readfile.js index 575ceff34eb294..49958435c797d5 100644 --- a/benchmark/fs/readfile.js +++ b/benchmark/fs/readfile.js @@ -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 }) { diff --git a/benchmark/fs/write-stream-throughput.js b/benchmark/fs/write-stream-throughput.js index 88d3bce06d114e..bd0220112b1624 100644 --- a/benchmark/fs/write-stream-throughput.js +++ b/benchmark/fs/write-stream-throughput.js @@ -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 }) { diff --git a/benchmark/fs/writefile-promises.js b/benchmark/fs/writefile-promises.js index 8b3cd528bac5c9..66b4150374847c 100644 --- a/benchmark/fs/writefile-promises.js +++ b/benchmark/fs/writefile-promises.js @@ -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 }) {