mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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:
parent
dc90810f9f
commit
9e5d1af3ea
15 changed files with 15 additions and 16 deletions
|
@ -13,7 +13,6 @@ overrides:
|
|||
- buffers/*.js
|
||||
- buffers-fill/*.js
|
||||
- crypto/*.js
|
||||
- fs/*.js
|
||||
- http/*.js
|
||||
- http2/*.js
|
||||
- misc/*.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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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'],
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -5,7 +5,7 @@ const fs = require('fs');
|
|||
|
||||
const bench = common.createBenchmark(main, {
|
||||
n: [20e4],
|
||||
statType: ['fstat', 'lstat', 'stat']
|
||||
statType: ['fstat', 'lstat', 'stat'],
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const path = require('path');
|
|||
|
||||
const bench = common.createBenchmark(main, {
|
||||
n: [1e6],
|
||||
statSyncType: ['throw', 'noThrow']
|
||||
statSyncType: ['throw', 'noThrow'],
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ const fs = require('fs');
|
|||
|
||||
const bench = common.createBenchmark(main, {
|
||||
n: [1e6],
|
||||
statSyncType: ['fstatSync', 'lstatSync', 'statSync']
|
||||
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue