PdfPerf class abstract final

The shared perf facade. All members are static; see the library docs for the cost contract.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

debugInitialized bool
True once enabled = true has allocated recording state. Stays false across a fully disabled workload - the zero-allocation contract's test hook.
no setter
enabled bool
Whether recording is active. The setter lazily allocates the clock and accumulators on first enable; disabling stops recording but keeps accumulated data for snapshot.
getter/setter pair
sink ↔ void Function(String line)?
Optional line sink for events and lifecycle lines. Null (the default) drops them. The Flutter layer points this at PdfPerfLog; harnesses point it at their collectors.
getter/setter pair

Static Methods

add(PdfPerfCount count, [int n = 1]) → void
Bumps count by n.
begin() int
Timestamp in microseconds, or 0 when disabled. Pair with end.
end(PdfPerfPhase phase, int t0) → void
Accumulates the time since begin's t0 into phase.
event(PdfPerfEvent event, [String detail = '']) → void
Records a rare structural event; detail reaches sink verbatim.
reset() → void
Zeroes the accumulators (keeps enabled as-is). Corpus sweeps call this between files.
snapshot() PdfPerfStats
An immutable copy of everything recorded so far. Empty stats when recording was never enabled.

Constants

debugDceMarker → const String
Marker literal referenced only from guarded code paths; tool/check_perf_dce.sh greps compiled JS for it to prove that --dart-define=PDF_PERF=false eliminated the facade.