Reduces a history of per-frame pass samples into a FrameTimingReport.
frames is empty for a session where nothing was ever recorded (or the
mode is 'disabled') — computeDurationStats([]) already returns the
explicit count: 0 / all-null shape for that case, so no special
handling is needed here beyond passing mode through.
Reduces a history of per-frame pass samples into a
FrameTimingReport.framesis empty for a session where nothing was ever recorded (or the mode is'disabled') —computeDurationStats([])already returns the explicitcount: 0/ all-nullshape for that case, so no special handling is needed here beyond passingmodethrough.