Repository navigation
0.0.12
Added
-
dusk:perf_begin/dusk:perf_end: frame attribution around a driven interaction. A dusk session could tell you a screen was slow and nothing about why. The pair brackets an interaction:perf_beginturnsFlutterTimelinecollection on (first, becausestartSyncandfinishSyncboth read that flag and enabling the build flags ahead of it pushes a finish with no matching start), thendebugProfileBuildsEnabled+debugProfileBuildsEnabledUserWidgets, and on--phasesalsodebugProfileLayoutsEnabled+debugProfilePaintsEnabled. The flags live in two different libraries,package:flutter/widgets.dartandpackage:flutter/rendering.dart.perf_endreturns the frame summary under Flutter's own metric names, a session-wide block ranking naming the widget and RenderObject types that ran, wind's cache hit/miss/bypass counters and magic's controller-notify counts, then puts every flag back to the value it had BEFORE the session rather than tofalse, because a host that had build profiling on for its own reasons must get it back. Aperf_beginon an already-open session restarts it, restoring before it re-saves, so a dropped connection cannot strand the profiling flags on. New:lib/src/extensions/ext_perf.dart,lib/src/commands/dusk_perf_begin_command.dart,lib/src/commands/dusk_perf_end_command.dart, plus thedusk_perf_begin/dusk_perf_endMCP descriptors. 36 CLI commands, 35 MCP tools, 32ext.dusk.*extensions. -
A session the engine did not render through is refused, not reported. Every number in a stalled session is a zero, and a table of zeros reads as "fast": that is the reading a live probe produced three times against a Chrome tab that was merely behind another window.
perf_endcompares a liveness counter across the session and answersrefused: truewith a reason and NO metrics block at all when it did not advance. The counter is the authority rather than thewarningsblock on the same response:SchedulerBinding.framesEnabled, which that block reads, was measured reportingtruewith lifecycleresumedon a page that was hidden and had produced one frame in two seconds. Both signals can ride on one payload, sorefusedis always present and is the only discriminator.dusk:perf_endexits non-zero on a refusal so a shell caller cannot chain on a report that does not exist. -
Four settable perf pointers on the public barrel, and a frame summarizer behind them. dusk's frozen contract #10 limits it to four dependencies and telescope, wind and magic are none of them, so the data crosses through function pointers
magic_devtoolsassigns:framePerfReader(frames plus the liveness counter),perfExtrasReader(magic's controller notifies and route transitions),perfSessionBeginHook(zero wind's counters AND turn its counting on;WindPerfCounters.enableddefaults to false and dusk cannot reach it, so a hook that only zeroed would have produced a wind section of all zeros next to fully populated frame and magic sections with no error anywhere) andperfSessionEndHook(turn it back off, the same disciplineperf_endapplies to thedebugProfile*flags). All four default to no-ops, so dusk andmagic_devtoolsbuild independently.summarizeFramePerfinlib/src/utils/frame_summary.dart(package-internal, deliberately not on the barrel) turns the frame list intoaverage_frame_build_time_millis, the 90th/99th percentiles, the worst frame, the missed-budget counts and the rasterizer equivalents, usingflutter_driver's metric-name strings character for character so a reading here is comparable to devicelab's. Two additions Flutter's own summarizer has no counterpart for: a dropped-frame count derived from GAPS in the frame-number sequence, because on web a dropped scene is a missing frame number rather than a slow frame, and the worst N frames with their block attribution attached. New:lib/src/utils/perf_readers.dart,lib/src/utils/frame_summary.dart; the four pointers are exported fromlib/dusk.dartand listed under ARCHITECTURE.md's frozen contracts. -
Per-type durations are labelled indicative in the payload itself. Flutter's docblocks on the three
debugProfile*flags say the overhead of adding timeline events is significant relative to the time each object takes, and this session runs against a debug build, which widens the gap again. A number that travels without that caveat gets quoted as a production fact, soperf_endcarries anotesaying it: the counts, the ratios and the ranking are what direct a fix.