Skip to content

Commit 4f521c7

Browse files
starkwangMylesBorins
authored andcommitted
doc: add introduce about cli options
PR-URL: #18475 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 10dc25d commit 4f521c7

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
@@ -184,6 +184,17 @@ The `compare.js` tool will then produce a csv file with the benchmark results.
184184
$ node benchmark/compare.js --old ./node-master --new ./node-pr-5134 string_decoder > compare-pr-5134.csv
185185
```
186186

187+
*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:*
188+
189+
```console
190+
--new ./new-node-binary new node binary (required)
191+
--old ./old-node-binary old node binary (required)
192+
--runs 30 number of samples
193+
--filter pattern string to filter benchmark scripts
194+
--set variable=value set benchmark variable (can be repeated)
195+
--no-progress don't show benchmark progress indicator
196+
```
197+
187198
For analysing the benchmark results use the `compare.R` tool.
188199

189200
```console

0 commit comments

Comments
 (0)