enrichHeapGrowingIssue method

void enrichHeapGrowingIssue(
  1. List<AllocationEntry> allocators
)

Enrich the existing heap_growing issue with top allocator data. Called by the controller after getAllocationProfile returns (phase 2).

A profile that arrives after the growth episode ended is dropped: kept, it would label the next episode's first emission.

Implementation

void enrichHeapGrowingIssue(List<AllocationEntry> allocators) {
  final idx = _issues.indexWhere((i) => i.stableId == 'heap_growing');
  if (idx == -1) return;
  _lastTopAllocators = allocators;
  _issues[idx] = _issues[idx].copyWith(topAllocators: allocators);
}