Description
The OCaml project has two benchmark suites. One is Sandmark and the other is the ocurrent bench. The OCaml developers would like to have better support for triggering and reporting these benchmarks, and we have discussed some plans with Tarides engineers Shakthi Kanan, Puneeth Chaganti, and Riku Silvola.
Currently, the way of running Sandmark is to edit a configuration file in https://github.com/ocaml-bench/sandmark-nightly-config, to point to a branch that will then be tested every night. There is no reporting mechanism beyond the Sandmark dashboard itself, and developers use screenshots to report results to PR discussions. The ocurrent bench already has support for triggering a bench on a PR with a label and reporting the results as a status check to GitHub, using the ocaml-benchmarks GitHub app. While this could be improved as well, the priority is first to get something for Sandmark.
Ideally, the OCaml developers (and other interested OCaml projects) would use an OCaml-specific bot / GitHub app for this usage, but we decided that using the coqbot-app / @coqbot
commands would be fine for a prototype.
We also decided that it would be better to maintain and deploy the code for these features directly from the upstream coqbot master branch instead of creating a fork or a new bot that would reuse part of the codebase only, but would need to be maintained separately.
Finally, there are the options of deploying two separate bots running on different servers from the same code but using different configuration files (currently https://github.com/coq/bot/blob/master/coqbot-config.toml), or of deploying a single instance that would be able to manage several GitHub apps. In any case, we will start from the single GitHub app (coqbot-app) and the single deployed instance as things are set up today.
- Disable GitLab synchronization by default. #160
- Add support for
@coqbot bench
command or similar for the OCaml repository to trigger Sandmark bench.
The idea is that running this command will make coqbot push a commit to https://github.com/ocaml-bench/sandmark-nightly-config to edit the configuration files to include an entry pointing to the archive for the specific commit on which the bench was requested. The bot could take care of removing the entry when the bench results are posted, which could be done as a later step. BTW, how hard would it be to modify the configuration setup of Sandmark so that entries can be added to separate files? (This would make adding and removing configuration entries much easier, with less risk of conflicts.) - Add support for reporting results back from Sandmark to GitHub, as a comment and/or a GitHub Check.
This requires adding a call tocurl
in the Sandmark infrastructure so that the bot receives the information that a benchmark has finished and what it needs to print. We would add a dedicated endpoint to the bot, similar to what was done for the auto-minimization feature. The http request would either contain the full information that needs to be reported on GitHub, or the full information could be retrieved by the bot by fetching additional resources. - Add support for multi-app support from a single bot deployed instance or set up a separate deployment for the ocaml-bot version.
- Extend support to the ocurrent bench.