package bisect_ppx
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=1e646eafe6eb7a3ee36428dee8b772ac3e926d505dfd0d8178412e2c66b489dc
    
    
  md5=9b76f6f192307ec7098ded5e36670df2
    
    
  doc/bisect_ppx.runtime/Bisect/Runtime/index.html
Module Bisect.Runtime
This module provides runtime support for Bisect. Instrumented programs should hence be linked with this module.
Each instrumented file creates an array of counters, one for each point in that file. It then registers the array with this runtime module. Upon program exit (using at_exit), this module dumps the accumulated counts from all the arrays into an output file.
The default base name for the output file is bisect in the current directory, but another base name can be specified using the BISECT_FILE environment variable. The actual file name is the first non-existing <base><n>.out file where base is the base name and n a natural number value padded with zeroes to 4 digits (i.e. "0001", "0002", and so on).
Another environment variable can be used to customize the behaviour of Bisect: BISECT_SILENT. If this variable is set to YES or ON (ignoring case), then Bisect will not output any message. Otherwise, Bisect will output a message in two situations:
- when the output file cannot be created at program termination;
- when the data cannot be written at program termination. If BISECT_SILENTis set toERR(ignoring case), these error messages are routed tostderr, otherwiseBISECT_SILENTis used to determine a filename for this output. The default value isbisect.log.
Because instrumented modules refer to Bisect, one is advised to link this module as one of the first ones of the program.
Since the counts output file and log file are, by default, relative to the current working directory, an instrumented process should be careful about changing its working directory, or else BISECT_FILE and BISECT_SILENT should be specified with absolute paths.
register_file file point_state point_definitions indicates that the file file is part of the application that has been instrumented, using the passed array point_state to store visitation counts. point_definitions is a serialized Common.point_definition list giving the locations of all points in the file.
val dump_counters_exn : out_channel -> unitdump_counters_exn channel dumps the runtime coverage counters to the specified channel.
An exception is raised if writing is not successful