package multicore-bench

  1. Overview
  2. Docs

Command line interface for a benchmark executable.

type output = [
  1. | `JSON
    (*

    `JSON gives the JSON output for current-bench.

    *)
  2. | `Brief
    (*

    `Brief gives concise human readable output.

    *)
  3. | `Diff of string
    (*

    `Diff "path.json" gives concise human readable diff against results stored in specified path.json file.

    *)
]

Specifies the output format.

val run : benchmarks:(string * Suite.t) list -> ?budgetf:float -> ?filters:string list -> ?debug:bool -> ?output:output -> ?argv:string array -> ?flush:bool -> unit -> unit

run ~benchmarks () interprets command line arguments and runs the benchmarks suites based on the arguments.

Optional arguments:

  • ~budgetf: A budget (usually) in seconds passed to each benchmark suite. This defaults to a small number so that a benchmark suite can be used as a test.
  • ~filters: A list of regular expressions to match names of benchmark suites. If any regular expression matches the name of benchmark, then that benchmark will be run. Defaults to [].
  • ~debug: Print progress information to help debugging. Defaults to false.
  • ~output: Output mode. Defaults to `JSON.
  • ~argv: Array of command line arguments. Defaults to Sys.argv.
  • ~flush: Whether to flush the standard output after writing it. Defaults to true.

Command line arguments take precedence over the optional arguments. In other words, you can specify the optional arguments to give defaults for the benchmark executable.

OCaml

Innovation. Community. Security.