0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/test/benchmark/test-benchmark-fs.js
Anna Henningsen b35181f877
fs: add bufferSize option to fs.opendir()
Add an option that controls the size of the internal
buffer.

Fixes: https://github.com/nodejs/node/issues/29941

PR-URL: https://github.com/nodejs/node/pull/30114
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-10-28 14:34:25 +01:00

25 lines
475 B
JavaScript

'use strict';
require('../common');
const runBenchmark = require('../common/benchmark');
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
runBenchmark('fs', [
'bufferSize=32',
'concurrent=1',
'dir=.github',
'dur=0.1',
'encodingType=buf',
'filesize=1024',
'len=1024',
'mode=callback',
'n=1',
'pathType=relative',
'size=1',
'statSyncType=fstatSync',
'statType=fstat',
'withFileTypes=false',
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });