| 1 | # Rocq Bench Scripts |
| 2 | |
| 3 | ## Path and Global Environment Setup |
| 4 | |
| 5 | The bench script will create a `$workdir/.bin` folder and place |
| 6 | binaries it owns there. As of today, this is mainly the `opam` binary, |
| 7 | so the script can easily control which version of `opam` is being used. |
| 8 | |
| 9 | This is fixed for a single bench invocation. |
| 10 | |
| 11 | ## Local Environment Setup |
| 12 | |
| 13 | Local environment setup is done by creating opam switches, see the |
| 14 | `bench.sh:create_opam` function. |
| 15 | |
| 16 | ## Timing |
| 17 | |
| 18 | Timing of package builds is done by instrumenting opam to wrap build |
| 19 | commands, using the `wrap-build-commands:` field to point to |
| 20 | `wrapper.sh`, which in turn calls `time` and `perf`. |
| 21 | |
| 22 | This is not perfect, but seems like a good enough approximation. |