Skip to content

Commit

Permalink
Merge pull request #3 from panglesd/oci-bench
Browse files Browse the repository at this point in the history
benchmark: review comments
  • Loading branch information
Julow authored Sep 29, 2023
2 parents 12d9624 + bd270fc commit c5d4cf5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ publish-docs:
test :
dune runtest

# Echo is disabled as the benchmarks results are printed on stdout.
# '@bench' exit status is not checked as it's very likely to fail due to
# needing promotion rather than because it really failed.
.PHONY : bench
bench:
-@dune build @bench
@dune promote driver-benchmarks.json
@cat driver-benchmarks.json
@dune build @bench

.PHONY : coverage
coverage :
Expand Down
4 changes: 2 additions & 2 deletions doc/driver.mld
Original file line number Diff line number Diff line change
Expand Up @@ -789,11 +789,11 @@ If needed, the list of commands executed so far can be shown by de-commenting th
# (* List.iter print_cmd (List.rev !commands);; *)
]}

Print the slowest commands for each subcommands:
If needed, the list of the slowest commands for each subcommands can be shown by de-commenting this block:
(for the record, these commands are run from directory `_build/default/doc`)

{[
# List.iter print_cmd (k_longest_commands "compile" 5)
# (* List.iter print_cmd (k_longest_commands "compile" 5) *)
# (* List.iter print_cmd (k_longest_commands "link" 5) *)
# (* List.iter print_cmd (k_longest_commands "html-generate" 5) *)
]}
Expand Down
7 changes: 2 additions & 5 deletions doc/dune
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@
(> %{ocaml_version} 4.11))
(deps
(package odoc)
(universe) ; Benchmark depends on the running time of odoc commands
(glob_files *.mld)
(glob_files library_mlds/*)
(glob_files examples/*.ml*))
(action
(progn
; Make sure the benchmark result is created as Dune would not show the diff
; if the script failed before creating it.
(write-file driver-benchmarks.json "")
(run ocaml-mdx-test --force-output %{dep:driver.mld}))))
(run ocaml-mdx-test --force-output %{dep:driver.mld})))

(rule
(alias docgen)
Expand Down
2 changes: 1 addition & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
(rule
(alias bench)
(action
(diff driver-benchmarks.json doc/driver-benchmarks.json)))
(cat doc/driver-benchmarks.json)))

0 comments on commit c5d4cf5

Please sign in to comment.