Skip to content

Commit 8ca6d34

Browse files
starkwanggibfahn
authored andcommitted
doc: add introduce about cli options
PR-URL: #18475 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7b6d93c commit 8ca6d34

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/guides/writing-and-running-benchmarks.md

+11
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,17 @@ The `compare.js` tool will then produce a csv file with the benchmark results.
183183
$ node benchmark/compare.js --old ./node-master --new ./node-pr-5134 string_decoder > compare-pr-5134.csv
184184
```
185185

186+
*Tips: there are some useful options of `benchmark/compare.js`. For example, if you want to compare the benchmark of a single script instead of a whole module, you can use the `--filter` option:*
187+
188+
```console
189+
--new ./new-node-binary new node binary (required)
190+
--old ./old-node-binary old node binary (required)
191+
--runs 30 number of samples
192+
--filter pattern string to filter benchmark scripts
193+
--set variable=value set benchmark variable (can be repeated)
194+
--no-progress don't show benchmark progress indicator
195+
```
196+
186197
For analysing the benchmark results use the `compare.R` tool.
187198

188199
```console

0 commit comments

Comments
 (0)