StreamResourcePollResult class

Diagnostic result of a single allocation-profile poll triggered by StreamResourceDetector.pollAllocationProfileNow. Capture screens log this every poll so an empty K=4 window can be diagnosed without a second 50-second on-device session.

errorReason values when succeeded is false: 'disabled' (detector off), 'no_vm_client' (no fetcher and no VM service), 'rpc_null' (RPC returned null — timeout, sentinel, or caught exception), 'reset_during_poll' (capture state cleared mid-poll, result discarded).

Annotations

Constructors

StreamResourcePollResult({required bool succeeded, int? memberCount, int? matchedCount, int? droppedNullLibUriCount, int? sampleWindowSize, Duration? rpcElapsed, String? errorReason, bool skippedInFlight = false, Map<String, List<int>>? bucketStates})
const

Properties

bucketStates → Map<String, List<int>>?
Snapshot of per-suffix sliding window after this poll's ingest. Keys are watchlist suffixes (e.g. _BroadcastSubscription, StreamSubscription); values are the most-recent-N instancesCurrent aggregates with N up to windowSize. Empty when no class matched. Capture screens use this to diagnose why a leg's K=4 window contains stable counts (workload allocations not landing in any expected bucket — suggests AOT class-name drift or GC reclaiming unreferenced subscriptions).
final
droppedNullLibUriCount → int?
Number of members dropped because classRef.library was null AND the class name didn't match a private-suffix fallback (capture procedure indicator: high counts here suggest the watchlist's _privateCoreSuffixes is incomplete relative to current Dart SDK).
final
errorReason → String?
Failure category when succeeded is false.
final
hashCode → int
The hash code for this object.
no setterinherited
matchedCount → int?
Number of members whose class matched the watchlist this poll.
final
memberCount → int?
profile.members.length on success. null on failure.
final
rpcElapsed → Duration?
Wall-clock duration of the getAllocationProfile RPC call.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleWindowSize → int?
Maximum sample count across all per-class windows after this poll's ingestion. Reaches windowSize (default 4) once at least one watchlist class has been observed across all K samples.
final
skippedInFlight → bool
True when an automatic poll was already in flight; the explicit caller awaited it instead of starting its own (barrier semantics). The result reflects the awaited poll's outcome.
final
succeeded → bool
Profile fetched, members iterated, window updated. False when errorReason is set.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited