package core_bench

  1. Overview
  2. Docs

Test.t are benchmarked by calls to bench.

val create : name:string -> ?test_name:string -> ?file_name:string -> ?module_name:string -> ?key:int -> (unit -> 'a) -> t

Creates a simple benchmark. Here the benchmark may return some 'a which is then ignored. One should be careful when putting calls to ignore in benchmarks because OCaml versions 4.02 onwards can optimize away some ignored computations.

val create_with_initialization : name:string -> ?test_name:string -> ?file_name:string -> ?module_name:string -> ?key:int -> ([ `init ] -> unit -> 'a) -> t
val create_parameterised : name:string -> ?test_name:string -> ?file_name:string -> ?module_name:string -> args:(string * 'param) list -> ?key:int -> ('param -> (unit -> 'a) Core.Staged.t) -> t

Creates a group of benchmarks indexed by a size. Also see comment on create about the 'a below.

val create_indexed : name:string -> ?test_name:string -> ?file_name:string -> ?module_name:string -> args:int list -> ?key:int -> (int -> (unit -> 'a) Core.Staged.t) -> t

Creates a group of benchmarks indexed by a size. Also see comment on create about the 'a below.

val create_group : name:string -> ?test_name:string -> ?file_name:string -> ?module_name:string -> t list -> t
val name : t -> string
OCaml

Innovation. Community. Security.