3. Save the results to disk

Now that you’ve captured a performance timeline, you need a way to review it.
The Timeline object provides detailed information about all of the events
that took place, but it doesn’t provide a convenient way to review the results.

Therefore, convert the Timeline into a TimelineSummary.
The TimelineSummary can perform two tasks that make it easier
to review the results:

Writing a json document on disk that summarizes the data contained
within the Timeline. This summary includes information about the
number of skipped frames, slowest build times, and more.

Saving the complete Timeline as a json file on disk.
This file can be opened with the Chrome browser’s
tracing tools found at chrome://tracing.

To capture the results, create a file named perf_driver.dart
in the test_driver folder and add the following code: