package core_bench

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file defaults.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
open Core

(* default columns for command *)
let columns_as_string = [ "time"; "alloc"; "percentage" ]

let columns_as_string_for_streaming =
  List.filter columns_as_string ~f:(Fn.non (String.equal "percentage"))
;;

let command_columns ~for_streaming =
  List.map
    ~f:Bench_command_column.of_string
    (if for_streaming then columns_as_string_for_streaming else columns_as_string)
;;

(* how to measure *)
let geometric_scale = 1.01
let stabilize_gc_between_runs = false
let no_compactions = false

(* how long to measure *)
let quota = Quota.Span (Time_float.Span.of_int_sec 10)

(* width of the output table *)
let limit_width_to = 200
let max_name_length = 110

(* Fork each benchmark and run in separate process *)
let fork_each_benchmark = false

(* default display *)
let display_as_string = "short"

let string_to_display =
  let module Display = Ascii_table_kernel.Display in
  function
  | "short" -> Display.short_box
  | "tall" -> Display.tall_box
  | "line" -> Display.line
  | "blank" -> Display.blank
  | "column" -> Display.column_titles
  | s -> failwithf "Invalid display name: %s" s ()
;;

let display = string_to_display display_as_string
OCaml

Innovation. Community. Security.