Skip to content

Count the gaps over 250 ms and 500 ms in every bench run (851-4503) - #1512

Merged
pondorasti merged 2 commits into
mainfrom
alexandru/851-4503-screen-sharing-bench-count-gaps-over-250
Nov 27, 2026
Merged

pondorasti merged 2 commits into
mainfrom
alexandru/851-4503-screen-sharing-bench-count-gaps-over-250

Conversation

@pondorasti

Copy link
Copy Markdown
Member

Fixes 851-4503

Benchmark-only. The freeze counter flags a gap three times the average of the 30 gaps before it, so its threshold follows the stream's own pace: a run that stutters throughout on a slow link barely freezes. This adds a fixed-threshold count next to it. The freeze counter is unchanged.

What changes

  • Each run with a continuously changing scene (typing, scroll, window drag, video) records long_gaps: the gaps between shown updates over 250 ms and over 500 ms, each as a count and the total time in them. Pauses over 5 s count too; the freeze counter reports those apart.
  • Both tiers store it with each result (long_gaps.over250_ms and long_gaps.over500_ms, each count and total_ms). The report schema stays v1: the field is optional, so older reports still read.
  • The Tier 1 lab table shows it per run, for example 12 (4.1 s). The Tier 2 target table adds four columns: the median count and the median seconds over each threshold.
  • Report validation rejects negative tallies, or one where the 500 ms tally exceeds the 250 ms one.

The nightly Tier 1 results page (ResultsMarkdown) is unchanged.

Tests

  • BenchLongGapsTests: the counts and totals above each threshold, and a run of even 400 ms gaps that the freeze counter calls 0 while every gap counts as long.
  • Both analyses record it exactly when they count freezes (BenchLoopbackAnalysisTests, BenchSharingAnalysisTests).
  • The golden report pins the stored keys, and the schema test covers the new validation.
  • Each tier's table shows the new fields (LoopbackSummaryTests, Tier2SystemRowTests).

Run locally with timeouts: ScreenSharingBenchTests 97 and CodevisorBenchTests 60 passed, plus swift:format:check and swift:lint.

Code review

Five findings: three fixed, two left.

Fixed:

  • Pauses over 5 s count as long gaps; the README now says so. Keeping them is the stricter reading.
  • The README now names only the tables that show the new fields.
  • Inconsistent tallies are rejected.

Left:

  • The Tier 2 columns are separate medians, so a count and the seconds next to it can come from different repetitions. That is how every column in that table works.
  • The Tier 1 table rounds seconds to 0.1 s.

🤖 Generated with Claude Code

pondorasti and others added 2 commits November 27, 2026 09:22
…es (851-4503)

The freeze counter flags a gap three times the stream's recent average, so a run that stutters throughout
barely freezes. Each run with a continuously changing scene now also records `long_gaps`: the number of
gaps between shown updates over 250 ms and over 500 ms, and the time spent in them. Both tiers store it,
the Tier 1 lab table shows it per run, and the Tier 2 target table shows the medians. The freeze counter
is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pondorasti
pondorasti merged commit b994219 into main Nov 27, 2026
33 checks passed
@pondorasti
pondorasti deleted the alexandru/851-4503-screen-sharing-bench-count-gaps-over-250 branch November 27, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant