frameworkBusySnapshot method

FrameworkBusySnapshot frameworkBusySnapshot()
inherited

Returns a synchronous, immutable snapshot of the current framework-level busy signals. In release mode returns FrameworkBusySnapshot.zero.

The returned object's recentFrameCommits is a fresh unmodifiable view over the bounded internal ring; the ring itself never exceeds _commitRingCap elements regardless of polling frequency.

Implementation

FrameworkBusySnapshot frameworkBusySnapshot() {
  if (!_enabled) return FrameworkBusySnapshot.zero;
  return FrameworkBusySnapshot(
    transientCallbacks: _transientInFlight,
    persistentCallbacks: _persistentRegistered,
    pendingMicrotasks: _microtaskPending,
    lastFrameCommitTimestamp: _lastCommit,
    recentSkippedFrames: _recentSkipped,
    recentFrameCommits: List<Duration>.unmodifiable(_commits),
  );
}