WindPerfCounters class

Opt-in aggregate counters for Wind's hottest path.

WindParser.parse runs on every build of every W-widget, so these counters are OFF by default and every increment sits behind enabled: a disabled counter costs one static bool load and returns. A debug tool (tapir's performance session, via Wind.installPerfResolver()) flips the flag on for the length of a measurement and reads the totals back out.

The cache has THREE outcomes, not two, and they are counted separately:

  • Hit: no baseStyle, and the context-derived cache key is present.
  • Miss: no baseStyle, key absent, so the style is parsed and cached.
  • Bypass: a baseStyle was supplied, so the parser never consults and never writes the cache (the key does not include baseStyle; see WindParser.parse). A bypass is a property of a CALLER writing style:, not of using WDiv or WText: both pass baseStyle: style, and style is the widget's own nullable property, null in ordinary use, so those calls take the cached path. Driven against a real app, bypasses measured zero across 1613 W-widget builds. Counting them separately is what turned that from an argument into a number; folding them into misses would have left a cache-miss rate that looks explainable and says nothing about the work that never amortises.

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

cacheBypasses → int
Parses that skipped the cache entirely because a baseStyle was given.
no setter
cacheHits → int
Parses served from the style cache.
no setter
cacheMisses → int
Parses that were not in the cache and were computed and cached.
no setter
enabled ↔ bool
Whether counting is active. false in every app that has not explicitly asked for a measurement, which is what keeps the cost opt-in.
getter/setter pair
inheritedReads → Map<String, int>
Inherited-widget read counts. Read-only snapshot; mutate only through recordInheritedRead.
no setter
wDivBuilds → int
WDiv builds that reached the style-resolution step.
no setter
widgetBuilds → Map<String, int>
Per-W-widget-type build counts. Read-only snapshot; mutate only through recordWidgetBuild.
no setter
wrapperEmissions → Map<String, int>
Per-wrapper-type emission counts. Read-only snapshot; mutate only through recordWrapperEmission.
no setter
wTextBuilds → int
WText builds that reached the style-resolution step.
no setter

Static Methods

reset() → void
Zeroes every counter, leaving enabled alone.