-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,67 @@ | ||
Benchmarks for Saturn | ||
# Benchmarks for Saturn | ||
|
||
# General usage | ||
Benchmarks are written using [multicore-bench](https://github.com/ocaml-multicore/multicore-bench). | ||
|
||
Execute `make bench` from root of the repository to run the standard set of | ||
benchmarks. The output is in JSON, as it is intended to be consumed by | ||
[current-bench](https://bench.ci.dev/ocaml-multicore/saturn/branch/main/benchmark/default). | ||
## General Usage | ||
|
||
To execute benchmarks, you can run: | ||
```shell | ||
make bench | ||
``` | ||
|
||
Alternatively, you can use: | ||
```shell | ||
dune exec -- ./bench/main.exe | ||
``` | ||
|
||
It is recommended to run the benchmarks with a budget of at least `1` second (as done with `make bench`): | ||
```shell | ||
dune exec -- ./bench/main.exe -budget 1 | ||
``` | ||
|
||
You can also print a brief version of the benchmarks with the `-brief` option. Additionally, it is possible to run only selected benchmarks by providing a part of the benchmark names. You can get the list of available benchmarks with the `--help` option. | ||
|
||
For example, running: | ||
```shell | ||
dune exec -- ./bench/main.exe --help | ||
``` | ||
returns: | ||
|
||
``` | ||
Usage: main.exe <option>* filter* | ||
The filters are regular expressions for selecting benchmarks to run. | ||
Benchmarks: | ||
Saturn Queue | ||
Saturn Queue_unsafe | ||
Saturn Bounded_Queue | ||
Saturn Bounded_Queue_unsafe | ||
Saturn Single_prod_single_cons_queue | ||
Saturn Size | ||
Saturn Skiplist | ||
Saturn Htbl | ||
Saturn Htbl_unsafe | ||
Saturn Stack | ||
Saturn Work_stealing_deque | ||
Saturn Bounded_Stack | ||
Options: | ||
-budget seconds Budget for a benchmark | ||
-debug Print progress information to help debugging | ||
-diff path.json Show diff against specified base results | ||
-brief Show brief human-readable results | ||
-help Show this help message | ||
--help Show this help message | ||
``` | ||
|
||
For example, if you want to run only the `Htbl` benchmarks to compare the performance of `Htbl` and its unsafe version `Htbl_unsafe`, you can run: | ||
```shell | ||
dune exec -- ./bench/main.exe -budget 1 -brief Htbl | ||
``` | ||
|
||
## Current-bench | ||
|
||
The output is in JSON format, as it is intended to be consumed by [current-bench](https://bench.ci.dev/ocaml-multicore/saturn/branch/main/benchmark/default). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters