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 = truehas 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
countbyn. -
begin(
) → int - Timestamp in microseconds, or 0 when disabled. Pair with end.
-
end(
PdfPerfPhase phase, int t0) → void -
Accumulates the time since begin's
t0intophase. -
event(
PdfPerfEvent event, [String detail = '']) → void -
Records a rare structural
event;detailreaches 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.shgreps compiled JS for it to prove that--dart-define=PDF_PERF=falseeliminated the facade.