Skip to main content

Module timing

Module timing 

Source
Expand description

Lightweight, env-gated per-stage timing for profiling the PDF pipeline.

Set FLEISCHWOLF_TIMING=1 to accumulate wall-clock time per named stage across all pages and print a sorted breakdown at process exit. Zero cost when the env var is unset (the Instant is still taken but nothing is recorded — call sites guard the hot path themselves where it matters).

Functions§

record
Record elapsed nanoseconds against stage. No-op unless timing is enabled.
report
Print the accumulated breakdown (descending by total time). Call once at the end of a conversion. No-op unless timing is enabled.
timed
Time a closure and attribute its wall-clock to stage.