mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
benchmark: use unique filenames in fs benchmarks
Use a unique file name for each benchmark. Running benchmarks simultaneously may be a bit of an unusual use case, but there are use cases, such as stress testing `test/parallel/test-benchmark-fs.js`. PR-URL: https://github.com/nodejs/node/pull/16776 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
780c2d3917
commit
cfda245706
3 files changed
+6
-3
No files matched your search
@@ -3,7 +3,8 @@
|
||||
|
||||
const path = require('path');
|
||||
const common = require('../common.js');
|
||||
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
|
||||
const filename = path.resolve(__dirname,
|
||||
`.removeme-benchmark-garbage-${process.pid}`);
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
const path = require('path');
|
||||
const common = require('../common.js');
|
||||
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
|
||||
const filename = path.resolve(__dirname,
|
||||
`.removeme-benchmark-garbage-${process.pid}`);
|
||||
const fs = require('fs');
|
||||
|
||||
const bench = common.createBenchmark(main, {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
const path = require('path');
|
||||
const common = require('../common.js');
|
||||
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
|
||||
const filename = path.resolve(__dirname,
|
||||
`.removeme-benchmark-garbage-${process.pid}`);
|
||||
const fs = require('fs');
|
||||
|
||||
const bench = common.createBenchmark(main, {
|
||||
|
||||
Reference in new issue
Block a user