Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime diagnostics configuration shared by Scan1/Scan2/validator code.

The hot paths still expose the historical CIRI_TRACE_* / CIRI_PROFILE_* environment-variable behavior for ad hoc debugging, but the preferred entry point is now the CLI. This module keeps that wiring in one place so the algorithm code can query “should I trace/profile?” without knowing whether the request came from an environment variable or an explicit command-line flag.

Functions§

cli_trace_enabled
Returns whether any CLI-provided trace reads are active.
emit_perf_line
Emits one profiling line either to the configured file or to stderr.
emit_trace_line
Emits one targeted read-trace line either to the configured file or stderr.
init_runtime
Initializes the optional trace/perf outputs for the current process.
scan1_profile_enabled
Returns whether Scan1 profiling is enabled.
scan2_profile_enabled
Returns whether Scan2 profiling is enabled.
should_trace_read
Returns whether the given read ID is selected for targeted tracing.
trace_hg2_enabled
Returns whether is_bsj_hg2 branch-level trace output is active.
with_trace_hg2_scope
Executes a closure while enabling is_bsj_hg2 branch tracing on this thread.