processHeapSample method

void processHeapSample(
  1. HeapSample sample
)

Process a heap memory sample from the VM service.

Implementation

void processHeapSample(HeapSample sample) {
  if (!_isEnabled) return;

  _firstHeapSampleTime ??= _clock();
  _heapSamples.add(sample);
  if (_heapSamples.length > _windowCapacity) _heapSamples.removeFirst();

  _evaluate();
}