writeSummaryToFile method

Future<void> writeSummaryToFile (String traceName, { String destinationDirectory, bool pretty: false })

Writes summaryJson to a file.

Implementation

Future<void> writeSummaryToFile(
  String traceName, {
  String destinationDirectory,
  bool pretty = false,
}) async {
  destinationDirectory ??= testOutputsDirectory;
  await fs.directory(destinationDirectory).create(recursive: true);
  final File file = fs.file(path.join(destinationDirectory, '$traceName.timeline_summary.json'));
  await file.writeAsString(_encodeJson(summaryJson, pretty));
}