-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmark: make temp file path configurable
In three fs benchmarks, a temp file is created in the source tree. For tests, allow the location to be configurable so it gets written to the test temp directory instead. Additionally, shave about a second off the test running time by setting `dur` to `0.1` instead of `1`. PR-URL: #17811 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
- Loading branch information
1 parent
2d11f6b
commit 14eb97e
Showing
4 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const common = require('../common'); | ||
const runBenchmark = require('../common/benchmark'); | ||
|
||
runBenchmark('fs', [ | ||
'n=1', | ||
'size=1', | ||
'dur=1', | ||
'dur=0.1', | ||
'len=1024', | ||
'concurrent=1', | ||
'pathType=relative', | ||
'statType=fstat', | ||
'statSyncType=fstatSync', | ||
'encodingType=buf', | ||
'filesize=1024' | ||
]); | ||
], { NODE_TMPDIR: common.tmpDir }); |