IFClite TypeScript API
    Preparing search index...

    Function computeDurationStats

    • Reduces a sample of durations (milliseconds) to summary statistics. Pure: no side effects, no clock reads — the durations are supplied by the caller, whether they came from GPU timestamp queries or the CPU frame-delta fallback (see frame-timing.ts).

      durationsMs.length === 0 returns EMPTY_STATS (count: 0, every other field null) rather than computing 0s — a percentile or a mean over an empty array is either NaN (misreported as a real "instant" frame) or a divide-by-zero, and either would read as "this was fast" instead of "this was never measured".

      Parameters

      • durationsMs: readonly number[]

      Returns DurationStats