oldGenerationGarbageCollections method Null safety

int oldGenerationGarbageCollections()

The total number of old generation garbage collections recorded in the timeline.

Implementation

int oldGenerationGarbageCollections() {
  return _timeline.events!.where((TimelineEvent event) {
    return event.category == 'GC' && event.name == 'CollectOldGeneration';
  }).length;
}