timeline_summary.dart 22.1 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import 'dart:convert' show JsonEncoder, json;
6
import 'dart:math' as math;
7 8 9 10 11

import 'package:file/file.dart';
import 'package:path/path.dart' as path;

import 'common.dart';
12
import 'gc_summarizer.dart';
13 14
import 'percentile_utils.dart';
import 'profiling_summarizer.dart';
15
import 'raster_cache_summarizer.dart';
16
import 'refresh_rate_summarizer.dart';
17
import 'scene_display_lag_summarizer.dart';
18
import 'timeline.dart';
19
import 'vsync_frame_lag_summarizer.dart';
20

21
const JsonEncoder _prettyEncoder = JsonEncoder.withIndent('  ');
22

23 24 25 26 27 28 29 30 31 32
const String _kEmptyDurationMessage = r'''
The TimelineSummary had no events to summarize.

This can happen if the timeline summarization covered too short of a period
or if the driver script failed to interact with the application to generate
events. For example, if your driver script contained only a "driver.scroll()"
command but the app under test was not scrollable then no events would be
generated by the interaction.
''';

33 34
/// The maximum amount of time considered safe to spend for a frame's build
/// phase. Anything past that is in the danger of missing the frame as 60FPS.
35
const Duration kBuildBudget = Duration(milliseconds: 16);
36

37 38 39 40 41 42
/// The name of the framework frame build events we need to filter or extract.
const String kBuildFrameEventName = 'Frame';

/// The name of the engine frame rasterization events we need to filter or extract.
const String kRasterizeFrameEventName = 'GPURasterizer::Draw';

43
/// Extracts statistics from a [Timeline].
44
class TimelineSummary {
45
  /// Creates a timeline summary given a full timeline object.
46
  TimelineSummary.summarize(this._timeline);
47

48
  final Timeline _timeline;
49 50 51

  /// Average amount of time spent per frame in the framework building widgets,
  /// updating layout, painting and compositing.
52
  ///
53
  /// Throws a [StateError] if this summary contains no timeline events.
54
  double computeAverageFrameBuildTimeMillis() {
55
    return _averageInMillis(_extractFrameDurations());
56 57
  }

58 59
  /// The [p]-th percentile frame rasterization time in milliseconds.
  ///
60
  /// Throws a [StateError] if this summary contains no timeline events.
61 62 63 64
  double computePercentileFrameBuildTimeMillis(double p) {
    return _percentileInMillis(_extractFrameDurations(), p);
  }

65
  /// The longest frame build time in milliseconds.
66
  ///
67
  /// Throws a [StateError] if this summary contains no timeline events.
68
  double computeWorstFrameBuildTimeMillis() {
69
    return _maxInMillis(_extractFrameDurations());
70 71
  }

72
  /// The number of frames that missed the [kBuildBudget] and therefore are
73
  /// in the danger of missing frames.
74
  int computeMissedFrameBuildBudgetCount([ Duration frameBuildBudget = kBuildBudget ]) => _extractFrameDurations()
75
    .where((Duration duration) => duration > kBuildBudget)
76 77
    .length;

78
  /// Average amount of time spent per frame in the engine rasterizer.
79
  ///
80
  /// Throws a [StateError] if this summary contains no timeline events.
81
  double computeAverageFrameRasterizerTimeMillis() {
82
    return _averageInMillis(_extractGpuRasterizerDrawDurations());
83 84 85 86
  }

  /// The longest frame rasterization time in milliseconds.
  ///
87
  /// Throws a [StateError] if this summary contains no timeline events.
88
  double computeWorstFrameRasterizerTimeMillis() {
89
    return _maxInMillis(_extractGpuRasterizerDrawDurations());
90 91
  }

92 93
  /// The [p]-th percentile frame rasterization time in milliseconds.
  ///
94
  /// Throws a [StateError] if this summary contains no timeline events.
95
  double computePercentileFrameRasterizerTimeMillis(double p) {
96
    return _percentileInMillis(_extractGpuRasterizerDrawDurations(), p);
97 98
  }

99 100
  /// The number of frames that missed the [kBuildBudget] on the raster thread
  /// and therefore are in the danger of missing frames.
101 102
  int computeMissedFrameRasterizerBudgetCount([ Duration frameBuildBudget = kBuildBudget ]) => _extractGpuRasterizerDrawDurations()
      .where((Duration duration) => duration > kBuildBudget)
103 104 105
      .length;

  /// The total number of frames recorded in the timeline.
106
  int countFrames() => _extractFrameDurations().length;
107

108 109 110
  /// The total number of rasterizer cycles recorded in the timeline.
  int countRasterizations() => _extractGpuRasterizerDrawDurations().length;

111 112 113 114 115 116 117 118 119 120 121 122 123 124
  /// The total number of old generation garbage collections recorded in the timeline.
  int oldGenerationGarbageCollections() {
    return _timeline.events!.where((TimelineEvent event) {
      return event.category == 'GC' && event.name == 'CollectOldGeneration';
    }).length;
  }

  /// The total number of new generation garbage collections recorded in the timeline.
  int newGenerationGarbageCollections() {
    return _timeline.events!.where((TimelineEvent event) {
      return event.category == 'GC' && event.name == 'CollectNewGeneration';
    }).length;
  }

125
  /// Encodes this summary as JSON.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
  ///
  /// Data ends with "_time_millis" means time in milliseconds and numbers in
  /// the "frame_build_times", "frame_rasterizer_times", "frame_begin_times" and
  /// "frame_rasterizer_begin_times" lists are in microseconds.
  ///
  /// * "average_frame_build_time_millis": Average amount of time spent per
  ///   frame in the framework building widgets, updating layout, painting and
  ///   compositing.
  ///   See [computeAverageFrameBuildTimeMillis].
  /// * "90th_percentile_frame_build_time_millis" and
  ///   "99th_percentile_frame_build_time_millis": The p-th percentile frame
  ///   rasterization time in milliseconds. 90 and 99-th percentile number is
  ///   usually a better metric to estimate worse cases. See discussion in
  ///   https://github.com/flutter/flutter/pull/19121#issuecomment-419520765
  ///   See [computePercentileFrameBuildTimeMillis].
  /// * "worst_frame_build_time_millis": The longest frame build time.
  ///   See [computeWorstFrameBuildTimeMillis].
  /// * "missed_frame_build_budget_count': The number of frames that missed
  ///   the [kBuildBudget] and therefore are in the danger of missing frames.
  ///   See [computeMissedFrameBuildBudgetCount].
  /// * "average_frame_rasterizer_time_millis": Average amount of time spent
  ///   per frame in the engine rasterizer.
  ///   See [computeAverageFrameRasterizerTimeMillis].
  /// * "90th_percentile_frame_rasterizer_time_millis" and
  ///   "99th_percentile_frame_rasterizer_time_millis": The 90/99-th percentile
  ///   frame rasterization time in milliseconds.
  ///   See [computePercentileFrameRasterizerTimeMillis].
  /// * "worst_frame_rasterizer_time_millis": The longest frame rasterization
  ///   time.
  ///   See [computeWorstFrameRasterizerTimeMillis].
  /// * "missed_frame_rasterizer_budget_count": The number of frames that missed
  ///   the [kBuildBudget] on the raster thread and therefore are in the danger
  ///   of missing frames.
  ///   See [computeMissedFrameRasterizerBudgetCount].
  /// * "frame_count": The total number of frames recorded in the timeline. This
  ///   is also the length of the "frame_build_times" and the "frame_begin_times"
  ///   lists.
  ///   See [countFrames].
  /// * "frame_rasterizer_count": The total number of rasterizer cycles recorded
  ///   in the timeline. This is also the length of the "frame_rasterizer_times"
  ///   and the "frame_rasterizer_begin_times" lists.
  ///   See [countRasterizations].
  /// * "frame_build_times": The build time of each frame, by tracking the
  ///   [TimelineEvent] with name [kBuildFrameEventName].
  /// * "frame_rasterizer_times": The rasterize time of each frame, by tracking
  ///   the [TimelineEvent] with name [kRasterizeFrameEventName]
  /// * "frame_begin_times": The build begin timestamp of each frame.
  /// * "frame_rasterizer_begin_times": The rasterize begin time of each frame.
  /// * "average_vsync_transitions_missed": Computes the average of the
  ///   `vsync_transitions_missed` over the lag events.
176
  ///   See [SceneDisplayLagSummarizer.computeAverageVsyncTransitionsMissed].
177 178 179
  /// * "90th_percentile_vsync_transitions_missed" and
  ///   "99th_percentile_vsync_transitions_missed": The 90/99-th percentile
  ///   `vsync_transitions_missed` over the lag events.
180
  ///   See [SceneDisplayLagSummarizer.computePercentileVsyncTransitionsMissed].
181 182 183 184 185 186 187
  /// * "average_vsync_frame_lag": Computes the average of the time between
  ///   platform vsync signal and the engine frame process start time.
  ///   See [VsyncFrameLagSummarizer.computeAverageVsyncFrameLag].
  /// * "90th_percentile_vsync_frame_lag" and "99th_percentile_vsync_frame_lag":
  ///   The 90/99-th percentile delay between platform vsync signal and engine
  ///   frame process start time.
  ///   See [VsyncFrameLagSummarizer.computePercentileVsyncFrameLag].
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
  /// * "average_layer_cache_count": The average of the values seen for the
  ///   count of the engine layer cache entries.
  ///   See [RasterCacheSummarizer.computeAverageLayerCount].
  /// * "90th_percentile_layer_cache_count" and
  ///   "99th_percentile_layer_cache_count": The 90/99-th percentile values seen
  ///   for the count of the engine layer cache entries.
  ///   See [RasterCacheSummarizer.computePercentileLayerCount].
  /// * "worst_layer_cache_count": The worst (highest) value seen for the
  ///   count of the engine layer cache entries.
  ///   See [RasterCacheSummarizer.computeWorstLayerCount].
  /// * "average_layer_cache_memory": The average of the values seen for the
  ///   memory used for the engine layer cache entries, in megabytes.
  ///   See [RasterCacheSummarizer.computeAverageLayerMemory].
  /// * "90th_percentile_layer_cache_memory" and
  ///   "99th_percentile_layer_cache_memory": The 90/99-th percentile values seen
  ///   for the memory used for the engine layer cache entries.
  ///   See [RasterCacheSummarizer.computePercentileLayerMemory].
  /// * "worst_layer_cache_memory": The worst (highest) value seen for the
  ///   memory used for the engine layer cache entries.
  ///   See [RasterCacheSummarizer.computeWorstLayerMemory].
  /// * "average_picture_cache_count": The average of the values seen for the
  ///   count of the engine picture cache entries.
  ///   See [RasterCacheSummarizer.computeAveragePictureCount].
  /// * "90th_percentile_picture_cache_count" and
  ///   "99th_percentile_picture_cache_count": The 90/99-th percentile values seen
  ///   for the count of the engine picture cache entries.
  ///   See [RasterCacheSummarizer.computePercentilePictureCount].
  /// * "worst_picture_cache_count": The worst (highest) value seen for the
  ///   count of the engine picture cache entries.
  ///   See [RasterCacheSummarizer.computeWorstPictureCount].
  /// * "average_picture_cache_memory": The average of the values seen for the
  ///   memory used for the engine picture cache entries, in megabytes.
  ///   See [RasterCacheSummarizer.computeAveragePictureMemory].
  /// * "90th_percentile_picture_cache_memory" and
  ///   "99th_percentile_picture_cache_memory": The 90/99-th percentile values seen
  ///   for the memory used for the engine picture cache entries.
  ///   See [RasterCacheSummarizer.computePercentilePictureMemory].
  /// * "worst_picture_cache_memory": The worst (highest) value seen for the
  ///   memory used for the engine picture cache entries.
  ///   See [RasterCacheSummarizer.computeWorstPictureMemory].
228
  Map<String, dynamic> get summaryJson {
229
    final SceneDisplayLagSummarizer sceneDisplayLagSummarizer = _sceneDisplayLagSummarizer();
230
    final VsyncFrameLagSummarizer vsyncFrameLagSummarizer = _vsyncFrameLagSummarizer();
231
    final Map<String, dynamic> profilingSummary = _profilingSummarizer().summarize();
232
    final RasterCacheSummarizer rasterCacheSummarizer = _rasterCacheSummarizer();
233
    final GCSummarizer gcSummarizer = _gcSummarizer();
234
    final RefreshRateSummary refreshRateSummary = RefreshRateSummary(vsyncEvents: _extractNamedEvents(kUIThreadVsyncProcessEvent));
235

236
    final Map<String, dynamic> timelineSummary = <String, dynamic>{
237
      'average_frame_build_time_millis': computeAverageFrameBuildTimeMillis(),
238 239
      '90th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(90.0),
      '99th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(99.0),
240
      'worst_frame_build_time_millis': computeWorstFrameBuildTimeMillis(),
241
      'missed_frame_build_budget_count': computeMissedFrameBuildBudgetCount(),
242
      'average_frame_rasterizer_time_millis': computeAverageFrameRasterizerTimeMillis(),
243 244
      '90th_percentile_frame_rasterizer_time_millis': computePercentileFrameRasterizerTimeMillis(90.0),
      '99th_percentile_frame_rasterizer_time_millis': computePercentileFrameRasterizerTimeMillis(99.0),
245 246
      'worst_frame_rasterizer_time_millis': computeWorstFrameRasterizerTimeMillis(),
      'missed_frame_rasterizer_budget_count': computeMissedFrameRasterizerBudgetCount(),
247
      'frame_count': countFrames(),
248
      'frame_rasterizer_count': countRasterizations(),
249 250
      'new_gen_gc_count': newGenerationGarbageCollections(),
      'old_gen_gc_count': oldGenerationGarbageCollections(),
251
      'frame_build_times': _extractFrameDurations()
252 253
          .map<int>((Duration duration) => duration.inMicroseconds)
          .toList(),
254
      'frame_rasterizer_times': _extractGpuRasterizerDrawDurations()
255 256 257 258 259 260 261 262
          .map<int>((Duration duration) => duration.inMicroseconds)
          .toList(),
      'frame_begin_times': _extractBeginTimestamps(kBuildFrameEventName)
          .map<int>((Duration duration) => duration.inMicroseconds)
          .toList(),
      'frame_rasterizer_begin_times': _extractBeginTimestamps(kRasterizeFrameEventName)
          .map<int>((Duration duration) => duration.inMicroseconds)
          .toList(),
263 264
      'average_vsync_transitions_missed': sceneDisplayLagSummarizer.computeAverageVsyncTransitionsMissed(),
      '90th_percentile_vsync_transitions_missed': sceneDisplayLagSummarizer.computePercentileVsyncTransitionsMissed(90.0),
265
      '99th_percentile_vsync_transitions_missed': sceneDisplayLagSummarizer.computePercentileVsyncTransitionsMissed(99.0),
266 267 268
      'average_vsync_frame_lag': vsyncFrameLagSummarizer.computeAverageVsyncFrameLag(),
      '90th_percentile_vsync_frame_lag': vsyncFrameLagSummarizer.computePercentileVsyncFrameLag(90.0),
      '99th_percentile_vsync_frame_lag': vsyncFrameLagSummarizer.computePercentileVsyncFrameLag(99.0),
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
      'average_layer_cache_count': rasterCacheSummarizer.computeAverageLayerCount(),
      '90th_percentile_layer_cache_count': rasterCacheSummarizer.computePercentileLayerCount(90.0),
      '99th_percentile_layer_cache_count': rasterCacheSummarizer.computePercentileLayerCount(99.0),
      'worst_layer_cache_count': rasterCacheSummarizer.computeWorstLayerCount(),
      'average_layer_cache_memory': rasterCacheSummarizer.computeAverageLayerMemory(),
      '90th_percentile_layer_cache_memory': rasterCacheSummarizer.computePercentileLayerMemory(90.0),
      '99th_percentile_layer_cache_memory': rasterCacheSummarizer.computePercentileLayerMemory(99.0),
      'worst_layer_cache_memory': rasterCacheSummarizer.computeWorstLayerMemory(),
      'average_picture_cache_count': rasterCacheSummarizer.computeAveragePictureCount(),
      '90th_percentile_picture_cache_count': rasterCacheSummarizer.computePercentilePictureCount(90.0),
      '99th_percentile_picture_cache_count': rasterCacheSummarizer.computePercentilePictureCount(99.0),
      'worst_picture_cache_count': rasterCacheSummarizer.computeWorstPictureCount(),
      'average_picture_cache_memory': rasterCacheSummarizer.computeAveragePictureMemory(),
      '90th_percentile_picture_cache_memory': rasterCacheSummarizer.computePercentilePictureMemory(90.0),
      '99th_percentile_picture_cache_memory': rasterCacheSummarizer.computePercentilePictureMemory(99.0),
      'worst_picture_cache_memory': rasterCacheSummarizer.computeWorstPictureMemory(),
285
      'total_ui_gc_time': gcSummarizer.totalGCTimeMillis,
286 287
      '30hz_frame_percentage': refreshRateSummary.percentageOf30HzFrames,
      '60hz_frame_percentage': refreshRateSummary.percentageOf60HzFrames,
288
      '80hz_frame_percentage': refreshRateSummary.percentageOf80HzFrames,
289 290 291
      '90hz_frame_percentage': refreshRateSummary.percentageOf90HzFrames,
      '120hz_frame_percentage': refreshRateSummary.percentageOf120HzFrames,
      'illegal_refresh_rate_frame_count': refreshRateSummary.framesWithIllegalRefreshRate.length,
292
    };
293 294 295

    timelineSummary.addAll(profilingSummary);
    return timelineSummary;
296 297 298
  }

  /// Writes all of the recorded timeline data to a file.
299
  ///
300 301 302 303
  /// By default, this will dump [summaryJson] to a companion file named
  /// `$traceName.timeline_summary.json`. If you want to skip the summary, set
  /// the `includeSummary` parameter to false.
  ///
304 305 306
  /// See also:
  ///
  /// * [Timeline.fromJson], which explains detail about the timeline data.
307
  Future<void> writeTimelineToFile(
308
    String traceName, {
309
    String? destinationDirectory,
310
    bool pretty = false,
311
    bool includeSummary = true,
312
  }) async {
313
    destinationDirectory ??= testOutputsDirectory;
314
    await fs.directory(destinationDirectory).create(recursive: true);
315
    final File file = fs.file(path.join(destinationDirectory, '$traceName.timeline.json'));
316
    await file.writeAsString(_encodeJson(_timeline.json, pretty));
317 318 319 320

    if (includeSummary) {
      await _writeSummaryToFile(traceName, destinationDirectory: destinationDirectory, pretty: pretty);
    }
321 322 323
  }

  /// Writes [summaryJson] to a file.
324 325 326 327
  @Deprecated(
    'Use TimelineSummary.writeTimelineToFile. '
    'This feature was deprecated after v2.1.0-13.0.pre.'
  )
328
  Future<void> writeSummaryToFile(
329
    String traceName, {
330
    String? destinationDirectory,
331
    bool pretty = false,
332
  }) async {
333
    destinationDirectory ??= testOutputsDirectory;
334 335 336 337 338 339 340 341
    await _writeSummaryToFile(traceName, destinationDirectory: destinationDirectory, pretty: pretty);
  }

  Future<void> _writeSummaryToFile(
    String traceName, {
    required String destinationDirectory,
    bool pretty = false,
  }) async {
342
    await fs.directory(destinationDirectory).create(recursive: true);
343
    final File file = fs.file(path.join(destinationDirectory, '$traceName.timeline_summary.json'));
344 345 346
    await file.writeAsString(_encodeJson(summaryJson, pretty));
  }

347
  String _encodeJson(Map<String, dynamic> jsonObject, bool pretty) {
348
    return pretty
349 350
      ? _prettyEncoder.convert(jsonObject)
      : json.encode(jsonObject);
351 352
  }

353
  List<TimelineEvent> _extractNamedEvents(String name) {
354
    return _timeline.events!
355
      .where((TimelineEvent event) => event.name == name)
356 357 358
      .toList();
  }

359
  List<TimelineEvent> _extractEventsWithNames(Set<String> names) {
360
    return _timeline.events!
361
      .where((TimelineEvent event) => names.contains(event.name))
362 363 364
      .toList();
  }

365 366
  List<Duration> _extractDurations(
    String name,
367
    Duration Function(TimelineEvent beginEvent, TimelineEvent endEvent) extractor,
368
  ) {
369
    final List<Duration> result = <Duration>[];
370
    final List<TimelineEvent> events = _extractNamedEvents(name);
371 372

    // Timeline does not guarantee that the first event is the "begin" event.
373
    TimelineEvent? begin;
374
    for (final TimelineEvent event in events) {
375
      if (event.phase == 'B' || event.phase == 'b') {
376 377 378 379 380 381 382
        begin = event;
      } else {
        if (begin != null) {
          result.add(extractor(begin, event));
          // each begin only gets used once.
          begin = null;
        }
383 384 385 386 387 388
      }
    }

    return result;
  }

389 390
  /// Extracts Duration list that are reported as a pair of begin/end events.
  ///
391 392 393 394 395 396
  /// Extracts Duration of events by looking for events with the name and phase
  /// begin ("ph": "B"). This routine assumes that the next event with the same
  /// name is phase end ("ph": "E"), but it's not examined.
  /// "SceneDisplayLag" event is an exception, with phase ("ph") labeled
  /// 'b' and 'e', meaning begin and end phase for an async event.
  /// See [SceneDisplayLagSummarizer].
397 398 399 400 401
  /// See: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU
  List<Duration> _extractBeginEndEvents(String name) {
    return _extractDurations(
      name,
      (TimelineEvent beginEvent, TimelineEvent endEvent) {
402
        return Duration(microseconds: endEvent.timestampMicros! - beginEvent.timestampMicros!);
403 404 405 406 407 408 409 410
      },
    );
  }

  List<Duration> _extractBeginTimestamps(String name) {
    final List<Duration> result = _extractDurations(
      name,
      (TimelineEvent beginEvent, TimelineEvent endEvent) {
411
        return Duration(microseconds: beginEvent.timestampMicros!);
412 413 414 415 416 417 418 419 420 421
      },
    );

    // Align timestamps so the first event is at 0.
    for (int i = result.length - 1; i >= 0; i -= 1) {
      result[i] = result[i] - result[0];
    }
    return result;
  }

422
  double _averageInMillis(List<Duration> durations) {
423
    if (durations.isEmpty) {
424
      throw StateError(_kEmptyDurationMessage);
425
    }
426
    final double total = durations.fold<double>(0.0, (double t, Duration duration) => t + duration.inMicroseconds.toDouble() / 1000.0);
427
    return total / durations.length;
428 429
  }

430
  double _percentileInMillis(List<Duration> durations, double percentile) {
431
    if (durations.isEmpty) {
432
      throw StateError(_kEmptyDurationMessage);
433
    }
434
    assert(percentile >= 0.0 && percentile <= 100.0);
435
    final List<double> doubles = durations.map<double>((Duration duration) => duration.inMicroseconds.toDouble() / 1000.0).toList();
436
    return findPercentile(doubles, percentile);
437 438
  }

439
  double _maxInMillis(List<Duration> durations) {
440
    if (durations.isEmpty) {
441
      throw StateError(_kEmptyDurationMessage);
442
    }
443
    return durations
444
        .map<double>((Duration duration) => duration.inMicroseconds.toDouble() / 1000.0)
445
        .reduce(math.max);
446 447
  }

448 449
  SceneDisplayLagSummarizer _sceneDisplayLagSummarizer() => SceneDisplayLagSummarizer(_extractNamedEvents(kSceneDisplayLagEvent));

450
  List<Duration> _extractGpuRasterizerDrawDurations() => _extractBeginEndEvents(kRasterizeFrameEventName);
451

452
  ProfilingSummarizer _profilingSummarizer() => ProfilingSummarizer.fromEvents(_extractEventsWithNames(kProfilingEvents));
453

454
  List<Duration> _extractFrameDurations() => _extractBeginEndEvents(kBuildFrameEventName);
455 456

  VsyncFrameLagSummarizer _vsyncFrameLagSummarizer() => VsyncFrameLagSummarizer(_extractEventsWithNames(kVsyncTimelineEventNames));
457 458

  RasterCacheSummarizer _rasterCacheSummarizer() => RasterCacheSummarizer(_extractNamedEvents(kRasterCacheEvent));
459 460

  GCSummarizer _gcSummarizer() => GCSummarizer.fromEvents(_extractEventsWithNames(kGCRootEvents));
461
}