Files
node/test/parallel/test-benchmark-fs.js
T
Rich Trott f25bab5606 test: fix flaky test-benchmark-fs
Some benchmarks may return 0 operations with the new very short duration
provided by the test program. Set environment variable to allow that.

PR-URL: https://github.com/nodejs/node/pull/17885
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2018-01-09 04:32:43 -05:00

20 lines
399 B
JavaScript

'use strict';
const common = require('../common');
const runBenchmark = require('../common/benchmark');
common.refreshTmpDir();
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: common.tmpDir, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });