toJson method

Map<String, Object?> toJson()

Converts this aggregate summary into a serialization-friendly map.

Implementation

Map<String, Object?> toJson() {
  return <String, Object?>{
    'totalRenders': totalRenders,
    'changedRenders': changedRenders,
    'unchangedRenders': unchangedRenders,
    'changedRenderRatio': changedRenderRatio,
    'totalChangedCells': totalChangedCells,
    'totalChangedSpans': totalChangedSpans,
    'maxDirtyLines': maxDirtyLines,
    'maxChangedCells': maxChangedCells,
    'maxChangedSpans': maxChangedSpans,
    'totalRenderDurationUs': totalRenderDuration.inMicroseconds,
    'averageRenderDurationUs': averageRenderDuration.inMicroseconds,
    'lastRenderGeneration': lastRenderGeneration,
    'lastDegradationLevel': lastDegradationLevel?.name,
    'lastChangeSummary': lastChangeSummary?.toJson(),
  };
}