Open samrat opened 9 years ago
I believe this is what the run_bench
function should look like:
let run_bench tests =
Command.run (Bench.make_command tests);;
What about this? :-) Core_bench version: 109.58.01
let display_config = Bench.Display_config.create
~display:Textutils.Ascii_table.Display.column_titles
~ascii_table:true
~show_percentage:true
()
;;
let run_bench tests =
Bench.bench
~display_config:display_config
tests
;;
Also commented here: https://github.com/realworldocaml/book/issues/2714
If someone doesn't care about the display style, using Bench.bench
is also fine.
[ Bench.Test.create ~name:"plus_one_match" (fun () ->
ignore (plus_one_match 10))
; Bench.Test.create ~name:"plus_one_if" (fun () ->
ignore (plus_one_if 10)) ]
|> Bench.bench
;;
I'm trying to run the code in https://github.com/realworldocaml/examples/blob/master/code/lists-and-patterns/main.topscript#L62. However, it looks like the type signature of
Bench.bench
has changed since the example was written:The
core_bench
version I have installed is 112.35.00