Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2019-08-06 02:51:18 +0300
committerRich Trott <rtrott@gmail.com>2019-08-08 05:33:17 +0300
commitfd8d44f644798ed20bf950d1ff7982eba6cce0a7 (patch)
tree04297b36dfaaa33a5c35fa1184851bf257d17f9e /benchmark
parentc072a807178230948ed40dea0708593663efa0cd (diff)
benchmark: allow easy passing of process flags
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/common.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/common.js b/benchmark/common.js
index b4778d71935..6a3be4fc376 100644
--- a/benchmark/common.js
+++ b/benchmark/common.js
@@ -25,6 +25,10 @@ function Benchmark(fn, configs, options) {
if (options && options.flags) {
this.flags = this.flags.concat(options.flags);
}
+ if (process.env.NODE_BENCHMARK_FLAGS) {
+ const flags = process.env.NODE_BENCHMARK_FLAGS.split(/\s+/);
+ this.flags = this.flags.concat(flags);
+ }
// Holds process.hrtime value
this._time = [0, 0];
// Used to make sure a benchmark only start a timer once