toHumanReadable method

String toHumanReadable()

A multi-line, human-readable block.

The BenchmarkRunMode.warningBanner is baked into the string itself rather than left for the caller to prepend, so nothing that prints this report can forget to carry the warning along with it.

Implementation

String toHumanReadable() {
  final buffer = StringBuffer()
    ..writeln('$sceneId  [${runMode.name}]')
    ..writeln('  build:  $build')
    ..writeln('  raster: $raster')
    ..writeln('  total:  $total');
  if (notes != null) {
    buffer.writeln('  ($notes)');
  }
  if (!runMode.isTrustworthy) {
    buffer.writeln('  ${runMode.warningBanner}');
  }
  return buffer.toString();
}