hispecdrp.utils.perf_log
High-resolution wall timing for structured logs.
Call sites use perf_clock() and log_wall_s() without import time in
their modules; monotonic clocks live here only.
Functions
|
Log |
Return a monotonic reference time (seconds); pair with |
|
|
Elapsed seconds since |
- log_wall_s(logger, t0, fmt, *fmt_args, level=20)[source]
Log
fmtwithfmt_argspluswall_s=<elapsed>.Example:
log_wall_s(logger, t0, "STEP foo bar=%s", 42).
- perf_clock()[source]
Return a monotonic reference time (seconds); pair with
log_wall_s().
- wall_seconds(t0)[source]
Elapsed seconds since
t0fromperf_clock().