Skip to content
Permalink
Browse files

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>
  • Loading branch information...
mscdex authored and targos committed Aug 5, 2019
1 parent f194626 commit 5008b461594f6beb922bef849947b3a36ed52069
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 5008b46

Please sign in to comment.
You can’t perform that action at this time.