Module Ppx_module_timer_runtime
val am_recording : Base.bool
If true, ppx_module_timer records module startup times and reports them on stdout at process exit. Controlled by
am_recording_environment_variable
.
val am_recording_environment_variable : Base.string
If this environment variable is set (to anything) when this module starts up,
am_recording
is set to true.Equal to "PPX_MODULE_TIMER".
module Startup_time : sig ... end
val print_recorded_startup_times : (Startup_time.t Base.list -> Base.unit) Base.ref
If
am_recording
, called at process exit. The list is given in chronological order.The default callback prints each module name and startup time in the order given. To provide deterministic behavior in tests, if
am_recording_environment_variable
has the format of a time span, each recorded startup time is printed as a successive increment of that value.Core_kernel
overrides the default callback. The override formats the spans usingTime_ns.Span.to_string_hum
. It also accepts sexp lists of span*string pairs inam_recording_environment_variable
to replace all recorded values.
val gc_events_suffix_string : Startup_time.Gc_events.t -> Base.string
If all gc event counts are zero, the empty string. Otherwise a string such as:
"; GC: 2 minor collections, 1 major collections"