node/test/parallel/test-benchmark-fs.js
Rich Trott bf6ce47259 test: move tmpdir to submodule of common
Move tmpdir functionality to its own module (common/tmpdir).

PR-URL: https://github.com/nodejs/node/pull/17856
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-31 22:11:07 -08:00

21 lines
420 B
JavaScript

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