DebugSnapshot class
A snapshot of debug callback data accumulated over a time window.
Produced by DebugInstrumentationCoordinator.snapshot() and consumed
by detectors to provide per-widget-type rebuild and paint attribution.
Constructors
-
DebugSnapshot({required Map<
String, int> rebuildCounts, required int totalPaintCount, required Duration elapsed, Map<String, int> paintCounts = const {}, Map<String, String> ancestorChains = const {}, Map<String, int> animationOwnedPaintCounts = const {}, int totalAnimationOwnedPaintCount = 0, RebuildCountSource source = RebuildCountSource.none, Map<String, int> forcedRebuildsByRoot = const {}, bool rebuildTypesCapped = false, bool paintTypesCapped = false, Map<String, PaintOriginStats> paintOrigins = const {}, bool paintOriginTypesCapped = false}) -
const
Properties
-
ancestorChains
→ Map<
String, String> -
Per-widget-type ancestor chains (key = widget runtimeType name).
final
-
animationOwnedPaintCounts
→ Map<
String, int> -
Per-widget-type animation-owned paint counts (key = widget
runtimeType name). A subset of paintCounts: every entry here was
also counted in paintCounts, so detectors that want a "non-owned
residual" must subtract.
final
- elapsed → Duration
-
Time since last snapshot. Detectors MUST normalize counts to
per-second rates using this before applying thresholds, since
the snapshot interval is not guaranteed to be 1 second.
final
-
forcedRebuildsByRoot
→ Map<
String, int> -
Rebuilds a parent's build forced on the widgets below it, keyed by
the type of the self-dirtied widget whose build caused them
(debug mode).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
paintCounts
→ Map<
String, int> -
Per-widget-type paint counts (key = widget runtimeType name).
final
-
paintOrigins
→ Map<
String, PaintOriginStats> -
Per-widget-type likely repaint origins (key = widget runtimeType
name), debug mode only.
final
- paintOriginTypesCapped → bool
-
Some widget types were left out of paintOrigins by the type cap,
so a type missing from it is not known to be idle.
final
- paintsPerSecond → double
-
Total paints per second (aggregate, not per-widget).
no setter
- paintTypesCapped → bool
-
Some widget types were left out of paintCounts by the type cap.
final
-
rebuildCounts
→ Map<
String, int> -
Per-widget-type rebuild counts (key = widget runtimeType name).
final
- rebuildTypesCapped → bool
-
Some widget types were left out of rebuildCounts by the type cap,
so a type missing from it is not known to be idle.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → RebuildCountSource
-
Origin of rebuildCounts. See RebuildCountSource for semantics.
final
- totalAnimationOwnedPaintCount → int
-
Aggregate count of paints attributed to an animation owner (across
every widget type, regardless of whether the type made it into
paintCounts). Used by the aggregate-residual gate
(
residual = totalPaintCount - totalAnimationOwnedPaintCount).final - totalPaintCount → int
-
Aggregate paint call count (includes paints where widget attribution
was not possible).
final
- totalPaintsFromTypes → int
-
Total paints with widget-type attribution.
no setter
- totalRebuilds → int
-
Total rebuilds across all widget types.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paintOriginsPerSecondForType(
String typeName) → double -
Frames per second in which the busiest instance of
typeNamewas a likely repaint origin (PaintOriginStats.maxCount over elapsed). -
paintsPerSecondForType(
String typeName) → double - Paints per second for a specific widget type.
-
rebuildsPerSecond(
String typeName) → double - Rebuilds per second for a specific widget type.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited