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 5008b46

Browse filesBrowse files
mscdextargos
authored andcommitted
benchmark: allow easy passing of process flags
PR-URL: #28986 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent f194626 commit 5008b46
Copy full SHA for 5008b46

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎benchmark/common.js‎

Copy file name to clipboardExpand all lines: benchmark/common.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ function Benchmark(fn, configs, options) {
2525
if (options && options.flags) {
2626
this.flags = this.flags.concat(options.flags);
2727
}
28+
if (process.env.NODE_BENCHMARK_FLAGS) {
29+
const flags = process.env.NODE_BENCHMARK_FLAGS.split(/\s+/);
30+
this.flags = this.flags.concat(flags);
31+
}
2832
// Holds process.hrtime value
2933
this._time = [0, 0];
3034
// Used to make sure a benchmark only start a timer once

0 commit comments

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