Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3fc7050

Browse filesBrowse files
Trottgibfahn
authored andcommitted
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: #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>
1 parent 7e8d60e commit 3fc7050
Copy full SHA for 3fc7050

File tree

Expand file treeCollapse file tree

3 files changed

+6
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-3
lines changed
Open diff view settings
Collapse file

‎benchmark/fs/read-stream-throughput.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/read-stream-throughput.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
const path = require('path');
55
const common = require('../common.js');
6-
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
6+
const filename = path.resolve(__dirname,
7+
`.removeme-benchmark-garbage-${process.pid}`);
78
const fs = require('fs');
89
const assert = require('assert');
910

Collapse file

‎benchmark/fs/readfile.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/readfile.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
const path = require('path');
77
const common = require('../common.js');
8-
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
8+
const filename = path.resolve(__dirname,
9+
`.removeme-benchmark-garbage-${process.pid}`);
910
const fs = require('fs');
1011

1112
const bench = common.createBenchmark(main, {
Collapse file

‎benchmark/fs/write-stream-throughput.js‎

Copy file name to clipboardExpand all lines: benchmark/fs/write-stream-throughput.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
const path = require('path');
55
const common = require('../common.js');
6-
const filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
6+
const filename = path.resolve(__dirname,
7+
`.removeme-benchmark-garbage-${process.pid}`);
78
const fs = require('fs');
89

910
const bench = common.createBenchmark(main, {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.