perfTimelineReader top-level property
Reader for the host-side timeline rows ext.dusk.perf_trace exports
beside dusk's own interactions and frames: HTTP requests, queries, magic
notifies, counters, anything with a time on it.
One row per map:
{kind: 'span'|'instant'|'counter', track: String, name: String,
startUs: int, endUs: int?, id: String?, interactionId: String?,
linkedBy: String?, value: num?, args: Map?}
- Times are
FlutterTimeline.nowmicroseconds, the clock dusk stamps interactions and the session window with. kind: 'span'with anidbecomes an asyncb/epair keyed by that id, the shape for work that overlaps other work on its track (two HTTP requests in flight). Without anidit becomes anXslice, which must nest on its track; dusk moves one that would not to an overflow lane (<track> (2)) rather than emit a trace Perfetto draws wrongly. A span with noendUsis still running and ends at the session's end.kind: 'instant'becomes anievent,kind: 'counter'aCevent carryingvalue.interactionIdnames thePerfInteractionthe row belongs to andlinkedByhow that was established:'zone'when the work read the interaction off its own zone,'frame'when it ran in the frame zone and was joined throughactiveInteraction()by time.
Return the whole buffer: dusk keeps only rows starting inside the session
window. A row missing kind, track, name or an int startUs, a kind
outside the three above, or a counter without a numeric value is
skipped and counted in the trace's otherData.skippedRows, never a failed
export.
Defaults to no rows, so a host without the perf integration wired still gets a trace of dusk's interactions and frames.
Contract: set-once-per-isolate from MagicPerfIntegration.install().
Reset to this default by MagicPerfIntegration.resetForTesting().
Implementation
List<Map<String, Object?>> Function() perfTimelineReader =
() => <Map<String, Object?>>[];