mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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>
20 lines
399 B
JavaScript
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 });
|