Skip to content

Commit d82178e

Browse files
committed
docs: clarify benchmark usage
1 parent 16e7ee3 commit d82178e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/benchmarks/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,13 @@ The reference traces are stored via Git LFS so the repository stays lightweight.
66

77
At the moment there is a single benchmark (`heavy_work`) that exercises a mixture of array and hash operations while computing prime numbers. More benchmarks will be added as we expand the suite.
88

9-
Use `run_benchmarks.rb --write-report=console BENCHMARKS_DIR` to execute a single benchmark and print the runtime. Passing a path ending with `.json` or `.svg` will run all benchmarks and write a report in the chosen format.
9+
Use `run_benchmarks.rb` to execute the benchmarks. The first argument is a glob
10+
pattern that selects which benchmark(s) to run. For example, to run the
11+
`heavy_work` benchmark and print the timings to the console:
12+
13+
```
14+
$ ruby run_benchmarks.rb heavy_work --write-report=console
15+
```
16+
17+
Passing a path ending with `.json` or `.svg` will run all benchmarks and write a
18+
report in the chosen format.

0 commit comments

Comments
 (0)