From 9bbb99953dcdf4e6a7936eeb29d8a130f5bd5444 Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Mon, 2 Dec 2024 12:32:36 +0100 Subject: [PATCH] Improve bench/README.md --- bench/README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++---- bench/main.ml | 4 +-- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/bench/README.md b/bench/README.md index 7ab7eb15..810f36a6 100644 --- a/bench/README.md +++ b/bench/README.md @@ -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