renderSummary method

String renderSummary()

Implementation

String renderSummary() {
  String fmt(int bytes) => '${(bytes / 1024).toStringAsFixed(1)} KB';
  return [
    '  $label: hits=$hitCount elapsed=${elapsedMs.toStringAsFixed(2)}ms '
        'total=${fmt(totalStringBytes)} body_like=${fmt(bodyLikeBytes)}',
    '    meta=${fmt(metaBytes)} context=${fmt(contextBytes)} '
        'full_chunks=${fmt(fullChunkBytes)} preview=${fmt(previewBytes)}',
    '    native_read rows=$nativeRowsRead bytes=${fmt(nativeContentBytesRead)} '
        'hybrid=${fmt(nativeHybridResultContentBytes)} '
        'assembly=${fmt(nativeAssemblyContentBytes)} '
        'full=${fmt(nativeFullHydrateContentBytes)} '
        'preview=${fmt(nativePreviewContentBytes)} '
        'unclassified=${fmt(nativeUnclassifiedContentBytes)}',
    '    scoped_exact_scan rows=$nativeScopedExactScanRows '
        'bytes=${fmt(nativeScopedExactScanContentBytes)} '
        'tokenized_rows=$nativeScopedExactScanTokenizedRows '
        'tokenized_bytes=${fmt(nativeScopedExactScanTokenizedContentBytes)} '
        'tokens=$nativeScopedExactScanTokens '
        'tokenize=${nativeScopedExactScanTokenizationMs.toStringAsFixed(3)}ms',
  ].join('\n');
}