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:
authorMatheus Marchini <mmarchini@netflix.com>2019-10-16 01:14:20 +0300
committerMatheus Marchini <mmarchini@netflix.com>2019-12-10 22:34:46 +0300
commita4e7ea8a3af4b8062705c491607e8bd96810ab5b (patch)
treeaaf5126a89727fd23439dca49c7818c755339217 /benchmark/run.js
parent5c71c123637b56a6eacbf72fdb762306d3810116 (diff)
benchmark: improve `--filter` pattern matching
* Let users provide more than one pattern by repeating the flag * Add new flag --exclude to exclude patterns * Add tests for --filter * Document --filter This commit also fixes a bug where things like `compare.js --new --old binary --new binary` was acceptable (now the script will exit and print the usage message). PR-URL: https://github.com/nodejs/node/pull/29987 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'benchmark/run.js')
-rw-r--r--benchmark/run.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/benchmark/run.js b/benchmark/run.js
index 2eb1ab1a4b0..8e81a2c5e16 100644
--- a/benchmark/run.js
+++ b/benchmark/run.js
@@ -8,10 +8,13 @@ const cli = CLI(`usage: ./node run.js [options] [--] <category> ...
Run each benchmark in the <category> directory a single time, more than one
<category> directory can be specified.
- --filter pattern string to filter benchmark scripts
+ --filter pattern includes only benchmark scripts matching <pattern>
+ (can be repeated)
+ --exclude pattern excludes scripts matching <pattern> (can be
+ repeated)
--set variable=value set benchmark variable (can be repeated)
--format [simple|csv] optional value that specifies the output format
-`, { arrayArgs: ['set'] });
+`, { arrayArgs: ['set', 'filter', 'exclude'] });
const benchmarks = cli.benchmarks();
if (benchmarks.length === 0) {