vmConnected property

bool get vmConnected

Current VM connectivity — set by the controller.

Implementation

bool get vmConnected => _vmConnected;
  1. @override
set vmConnected (bool value)
override

Update VM connectivity state.

Hybrid detectors override this to degrade analysis when VM disconnects.

Implementation

@override
set vmConnected(bool value) {
  final wasConnected = _vmConnected;
  _vmConnected = value;
  if (!value) {
    _paintTimeUs = 0;
    _pendingVmWindowPercent = null;
    _vmHeld = null;
    _vmQuietWindows = 0;
    _vmBelowCriticalWindows = 0;
    _vmIssues.clear();
    // Nothing else recomposes without debug snapshots, so the VM card
    // would outlive the connection.
    if (wasConnected) _compose();
    _pendingEnrichedDirtyTotal = 0;
    _stagedEnrichedDirtyTotal = null;
    // Capture-mode observables also clear on disconnect so a leg
    // straddling a VM disconnect cannot export a stale peak from
    // before the drop. Reconnected post-disconnect runs accumulate
    // a fresh peak from the new windows.
    _lastObservedPaintPercent = 0;
    _peakObservedPaintPercent = 0;
  } else if (!wasConnected) {
    // Reconnect: stage a fresh-zero so the next _evaluate() flushes
    // stale debug issues that are incompatible with VM mode. The window
    // restarts so its elapsed time excludes the disconnect.
    _pendingVmWindowPercent = 0;
    _windowStart = _clock();
  }
}