Skip to main content

Module trace

Module trace 

Source
Expand description

Opt-in diagnostics. rq -v (or RQ_LOG set in the environment, so an already-installed binary can be debugged without a rebuild) turns on stderr trace lines describing what each search and index pass decided — the resolved root and coverage, what got warmed, written, or reconciled away, and how long the search took. Off by default; when off it’s a single relaxed atomic load, so it costs nothing on the hot path. Trace goes to stderr, never stdout, so results stay machine-parseable.

Structs§

Timer
Times a phase and logs <label> (N ms) when dropped — but only if tracing was on at construction, so it’s free otherwise.

Functions§

abbrev
A path for display in trace lines, with the home directory shown as ~.
enable_from
Enable tracing from the -v flag; RQ_LOG in the environment also enables it, so a shipped binary can be debugged in place.
enabled
Whether trace output is on.