DVWindowPerformance class
What the windowing layer measures, and what it finds in the measurements.
The specification's performance contract for Multi-Window names five
measurements -- open() to ready (real and virtual), tear-out handover,
shared-store write rate and coalescing ratio, store size and spill count,
and restore-on-launch duration -- and four diagnostics. This is where they
live. The manager, the shared store and the tab workspace record into it;
the running application publishes it beside its live window list, and
dartvel analyze performance reads it from there.
Time comes from nowMicros rather than a stopwatch so a test can hand in
a clock and know the duration between two reads, instead of asserting on
whatever the runner's scheduler happened to allow.
Constructors
- DVWindowPerformance({int nowMicros()?, Duration frameBudget = const Duration(milliseconds: 16), Duration startupBudget = const Duration(milliseconds: 500), int minimumSamples = 3})
Properties
-
burstWrites
→ Map<
String, int> -
Per key, how many writes landed within frameBudget of the previous
write to the same key -- writes coalescing has to absorb.
no setter
- coalescingRatio → double
-
The share of writes coalescing absorbed: 0 when every write was flushed,
approaching 1 when nearly all of them collapsed into one.
no setter
-
degradationsByRoute
→ Map<
String, DVRouteDegradations> -
Opens and degradations per call site. The call site is the route: that
is what a window is identified by, and what a developer can find.
no setter
-
findings
→ List<
DVWindowPerformanceFinding> -
What the measurements say is wrong. Each subject appears once: a call
site that always degrades is one finding, not a thousand log lines.
no setter
- frameBudget → Duration
-
One frame at 60Hz: what a close of owned windows, or a burst of writes
to one key, is measured against.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- minimumSamples → int
-
How many opens a call site needs before "always degrades" is a finding
rather than a coincidence.
final
-
opens
→ List<
DVWindowOpenSample> -
Every
open()that made a window, real or virtual, in order.no setter -
ownedCloses
→ List<
DVOwnedCloseSample> -
Every close of a window that owned others.
no setter
-
restores
→ List<
DVWorkspaceRestoreSample> -
Every workspace restore.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spillCount → int
-
Values that left the preference store for file storage.
no setter
- startupBudget → Duration
-
What a workspace restore on launch is measured against.
final
- storeFlushes → int
-
Writes that reached the backend after coalescing.
no setter
- storeSizeBytes → int
-
Encoded bytes currently stored, across every key, spilled or not.
no setter
- storeWrites → int
-
Calls to
seton the shared store.no setter -
tearOuts
→ List<
DVWindowTearOutSample> -
Every tear-out, from the gesture to the new window being ready.
no setter
Methods
-
mark(
) → int - A point in time, for callers that measure a span.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordOpen(
{required String route, required bool virtual, required Duration elapsed, String? code}) → void -
recordOpenFrom(
int mark, {required String route, required bool virtual, String? code}) → void -
recordOwnedCloseFrom(
int mark, {required String owner, required int owned}) → void -
recordRestoreFrom(
int mark, {required String name, required int tabs}) → void -
recordStoreFlush(
String key, {required int? bytes, bool spilled = false}) → void -
bytesis null when the key was removed. -
recordStoreWrite(
String key) → void -
recordTearOutFrom(
int mark, {required String route}) → void -
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- current ↔ DVWindowPerformance
-
The recorder everything reports into. DVWindowManager.reset installs a
fresh one so one test's samples are not the next test's findings.
getter/setter pair