perf library

Performance instrumentation facade for the dart-pdf workspace.

UNSTABLE diagnostics surface with no semver guarantee - deliberately not exported from package:pdf_cos/pdf_cos.dart. See the library docs in src/perf/perf.dart for the zero-overhead cost contract.

Classes

PdfPerf
The shared perf facade. All members are static; see the library docs for the cost contract.
PdfPerfBudget
Coarse upper-bound tripwires over a PdfPerfStats snapshot - same philosophy as the render path's PdfRenderPhaseBudget: bounds are set with generous headroom so only an order-of-magnitude regression (or a structural fault like an unexpected recovery scan) trips them.
PdfPerfStats
An immutable snapshot of PdfPerf accumulators.

Enums

PdfPerfCount
Monotonic counters: structural facts and byte volumes that drive performance, cheap enough to bump on the hottest paths.
PdfPerfEvent
Rare structural events worth a PdfPerf.sink line, not just a counter.
PdfPerfPhase
Timed phases. Enum-indexed so recording is string-free and alloc-free.

Constants

kPdfPerfCompiledIn → const bool
Compile-time kill switch. Defaults to compiled-in; build with --dart-define=PDF_PERF=false to dead-code-eliminate the entire facade.