diff --git a/benchmark/common.js b/benchmark/common.js index b4778d71935e25..6a3be4fc376920 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