summary static method

String summary()

A one line summary, suitable for printing next to frame timings.

Implementation

static String summary() {
  String percent(double? ratio) =>
      ratio == null ? '  n/a' : '${(ratio * 100).toStringAsFixed(1)}%';

  final lines = linesPerPaint;
  return 'paints ${paints.toString().padLeft(5)} | '
      'lines/paint ${lines == null ? ' n/a' : lines.toStringAsFixed(1).padLeft(5)} | '
      'paragraph hit ${percent(paragraphCacheHitRatio)} '
      '(${paragraphCacheHits + paragraphCacheMisses} lookups) | '
      'glyph hit ${percent(glyphCacheHitRatio)} '
      '(${glyphCacheHits + glyphCacheMisses} lookups)';
}