averageTotalDuration property

Duration get averageTotalDuration

Average total widget frame duration.

Implementation

Duration get averageTotalDuration {
  if (widgetTimings.isEmpty) return Duration.zero;
  final total = widgetTimings.fold<int>(
    0,
    (sum, t) => sum + t.totalDuration.inMicroseconds,
  );
  return Duration(microseconds: total ~/ widgetTimings.length);
}