diff options
author | Rich Trott <rtrott@gmail.com> | 2017-11-05 13:12:23 +0300 |
---|---|---|
committer | Gibson Fahnestock <gibfahn@gmail.com> | 2017-12-20 04:58:49 +0300 |
commit | 4597bd753a68f12d363885570c5f2662f9ec6394 (patch) | |
tree | 4923b683b2ffde4b27de60edf208b6c0d485f20f /benchmark | |
parent | f44ad162981fec4ebcecfbb8e4dca3f02653872b (diff) |
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>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/fs/read-stream-throughput.js | 3 | ||||
-rw-r--r-- | benchmark/fs/readfile.js | 3 | ||||
-rw-r--r-- | benchmark/fs/write-stream-throughput.js | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/benchmark/fs/read-stream-throughput.js b/benchmark/fs/read-stream-throughput.js index 4412d41f98d..85aa3c929fe 100644 --- a/benchmark/fs/read-stream-throughput.js +++ b/benchmark/fs/read-stream-throughput.js @@ -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'); diff --git a/benchmark/fs/readfile.js b/benchmark/fs/readfile.js index d89061d6061..82479ff14e5 100644 --- a/benchmark/fs/readfile.js +++ b/benchmark/fs/readfile.js @@ -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, { diff --git a/benchmark/fs/write-stream-throughput.js b/benchmark/fs/write-stream-throughput.js index 2083cccbd6a..5c6464fdbb2 100644 --- a/benchmark/fs/write-stream-throughput.js +++ b/benchmark/fs/write-stream-throughput.js @@ -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, { |