isHeapGrowingActive method

bool isHeapGrowingActive([
  1. int? windowMicros
])

Whether heap_growing was emitted within the recency window.

Returns false when no heap_growing has fired this session, or when the most recent emission is older than windowMicros (default 30 s). Distinct from the boolean "is the issue still in _issues?" — IssueRanker rotation and other persistence rules are not load-bearing for the recency claim. Used by StreamResourceDetector to gate its co-fire emission.

Implementation

bool isHeapGrowingActive([int? windowMicros]) {
  final last = _lastHeapGrowingEmittedAtMicros;
  if (last == null) return false;
  final window = windowMicros ?? _defaultHeapGrowingRecencyMicros;
  final now = _clock().microsecondsSinceEpoch;
  return now - last <= window;
}