newGenerationGarbageCollections method

int newGenerationGarbageCollections()

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

Implementation

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