-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: add synthetic benchmark #7189
perf: add synthetic benchmark #7189
Conversation
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
52bd596
to
48db2dd
Compare
@rgrinberg I am trying to add this new benchmark with a synthetic project, but dune seems to choke when building it, see sample build (already running for 2+ hours): https://github.com/jchavarri/dune/actions/runs/4281888888/jobs/7455464113 One can replicate locally following these steps, assuming you have the branch checked out:
It remains stuck on |
These are the last syscalls that i can see before killing the process, produced with
|
|
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
This is ready to review now. I did not manage to solve the issue with dune hanging when trying to execute the binary, but I ended up using The new benchmark results can be seen in https://jchavarri.github.io/dune/dev/bench/. Note the first commit in the chart had too short build time due to The only remaining questions would be about:
|
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
Do you think we can simplify the script a little?
|
In summary, the only parameter we should need is the number of modules to generate |
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
839b0ab
to
7de1cbd
Compare
Simplified gen_synthetic in 7de1cbd. I only removed the subfolders, because the generated code was only using one library already. |
.github/workflows/bench.yml
Outdated
|
||
- name: Run synthetic benchmark | ||
working-directory: bench/synthetic | ||
run: ../gen-benchmark.sh 'opam exec -- ../../_boot/dune.exe build ./main.exe' 'opam exec -- ../../_boot/dune.exe clean' 'synthetic build time (${{ runner.os }})' > synthetic-benchmark-result.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we run clean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise you don't get the "full picture" of the build. But we could go the other way: prepare the build first by running once the build, and only measure how long it takes to build again. Would that be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure which one is better. It's fine as is for now.
Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
a51c384
to
98c759b
Compare
* main: (56 commits) feature: add terminal ui backend based on NoTTY (ocaml#6996) doc(coq): update documentation about coqdep fix(rules): don't descend into automatic subdirs infinitely (ocaml#7208) benchmark: add warm run (ocaml#7198) test: vendored and public libs (ocaml#7197) test: use sh in concurrent test (ocaml#7205) fix: custom log file path (ocaml#7200) test(melange): add test exercising ocaml#7104 (ocaml#7204) test(melange): add a test that introduces rules in the target dir (ocaml#7196) test: duplicate packages in vendor dir (ocaml#7194) melange: interpret `melc --where` as a list of `:`-separated paths (ocaml#7176) perf: add synthetic benchmark (ocaml#7189) Test case for bug report (ocaml#6725) Add test illustrating ocaml#6575 (ocaml#6576) chore: add rule streaming proposal (ocaml#7195) test(stdlib): merge wrapped/unwrapped tests test: move all stdlib tests fix: allow unwrapped libraries with `(stdlib ..)` test: demonstrate crash in modules.ml when `(stdlib .. )` used with `(wrapped false)` fix(install): respect display options (ocaml#7116) ...
Description
bench
to generate synthetic projects:Will create a folder
test
with:4*4
dirs with4*4
modules each. Each module includesmli
Based on https://github.com/rescript-lang/build-benchmark.
Results
Check newly added chart "Synthetic benchmark" in https://jchavarri.github.io/dune/dev/bench/. Note the first commit in the chart had too short build time due to
dune clean
not being called properly.