module Bench: Bench
{
open Core.Std
open Core_bench.Std
let main () =
let t1 =
Bench.Test.create ~name:"ArrayCreateInt1" (fun () ->
ignore (Array.create ~len:200 0))
in
let t2 =
Bench.Test.create ~name:"ArrayCreateInt2" (fun () ->
ignore (Array.create ~len:300 0))
in
Command.run (Bench.make_command [t1; t2;])
let () = main ()
}
For default values of all the optional arguments, see the module called Defaults
in
bench_main.ml.
For some notes on the design space of bench and TODO items, see:
http://docs/programming/performance/benchmarking.html
module Test:sig
..end
module Column:sig
..end
module Variable:sig
..end
val bench : ?limit_width_to:int ->
?columns:[ `Allocated
| `Confidence
| `Cycles
| `GC
| `If_not_empty of Column.t
| `Name
| `Nanos
| `Percentage
| `Samples
| `Speedup ] list ->
?display:Textutils.Ascii_table.Display.t ->
?ascii_table:bool ->
?ci_absolute:bool ->
?predictors:Variable.t list ->
?verbosity:[ `High | `Low ] ->
?no_compactions:bool ->
?save_sample_data:bool ->
?time_quota:Core.Std.Time.Span.t ->
?sampling_type:[ `Geometric of float | `Linear of int ] ->
?stabilize_gc_between_runs:bool ->
?fork_each_benchmark:bool -> Test.t list -> unit
make_command
.val analyze : ?limit_width_to:int ->
?columns:[ `Allocated
| `Confidence
| `Cycles
| `GC
| `If_not_empty of Column.t
| `Name
| `Nanos
| `Percentage
| `Samples
| `Speedup ] list ->
?display:Textutils.Ascii_table.Display.t ->
?ascii_table:bool ->
?ci_absolute:bool ->
?predictors:Variable.t list -> saved_files:string list -> unit
val make_command : Test.t list -> Core.Std.Command.t