Module Bisect.Runtime

val register_file : bisect_file:string option -> bisect_silent:string option -> string -> point_count:int -> point_definitions:string -> [ `Staged of int -> unit ]

register_file ~bisect_file ~bisect_silent file ~point_count ~point_definitions indicates that the file file is part of the application that has been instrumented. point_definitions is a serialized Common.point_definition list giving the locations of all points in the file. The returned callback is used to increment visitation counts. bisect_file (resp. bisect_silent) is a default value for the environment variable BISECT_FILE (resp. BISECT_SILENT).

val get_coverage_data : unit -> string option

Returns the binary coverage data accumulated by the program so far. This should eventually be written to a file, to be processed by bisect-ppx-report.

val write_coverage_data : unit -> unit

On Node.js, writes the same coverage data that is returned by get_coverage_data to a .coverage file with a randomized name in the current directory.

val dump_counters_exn : Stdlib.out_channel -> unit

dump_counters_exn channel dumps the runtime coverage counters to the specified channel.

An exception is raised if writing is not successful

val reset_counters : unit -> unit

reset_counters () will reset the runtime coverage counters.