Skip to content

ci: compare sccache end to end on an FFmpeg build - #3006

Open
sylvestre wants to merge 1 commit into
mozilla:mainfrom
sylvestre:pr/e2e-bench
Open

sylvestre wants to merge 1 commit into
mozilla:mainfrom
sylvestre:pr/e2e-bench

Conversation

@sylvestre

@sylvestre sylvestre commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

The CodSpeed benchmarks count instructions in process, which misses what only shows across processes. Two examples found while benchmarking client-side mode on Firefox: the compiler being detected again in every client-side invocation, and each cache write waiting 40ms on a delayed ACK. Both made client-side mode slower than server mode without any benchmark noticing.

This adds scripts/e2e-bench.sh and a workflow that builds a reduced FFmpeg (309 translation units) through the sccache of the pull request and through the one of the branch it targets, in server and client-side mode, with a cold and a warm cache, alternating the binaries.

It fails on what is deterministic: a build that fails or hangs, a warm build that does not hit everything the cold build compiled, a cache write error, or server and client-side mode counting differently. Comparing the warm hits to what was compiled matters: a client whose connection breaks loses its stats, and with them the misses that would show an entry was never stored. With --large-entries it also checks that client-side mode caches entries over a 256KiB frame limit; main loses 3 of 309 entries there (#3003 fixes it), so the workflow leaves it off for now. It reports the times in the job summary and fails only when a median regresses by more than 30%, since shared runners are noisy. About 6 minutes of builds on a GitHub runner, 21 minutes with building the two sccache binaries. The script also runs locally.

Run against main and the client-side fixes (-j4): client-side / server is 1.33 cold and 4.35 warm on main, 1.01 and 1.14 with the fixes.

@codecov-commenter

codecov-commenter commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.21%. Comparing base (c1d7204) to head (cd9c499).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3006      +/-   ##
==========================================
- Coverage   79.20%   78.21%   -0.99%     
==========================================
  Files          75       75              
  Lines       46306    46306              
==========================================
- Hits        36675    36220     -455     
- Misses       9631    10086     +455     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvestre
sylvestre force-pushed the pr/e2e-bench branch 2 times, most recently from f28ff07 to c553fcd Compare November 8, 2026 10:49
The CodSpeed benchmarks count instructions in process, which misses what
only shows across processes: client-side mode detecting the compiler in
every invocation, or a cache write waiting 40ms on a delayed ACK. Both
made client-side mode slower than server mode without any benchmark
noticing.

Build a reduced FFmpeg (309 translation units) through the sccache of a
pull request and the one of the branch it targets, in server and client-
side mode, with a cold and a warm cache. Fail on what is deterministic:
a build that fails or hangs, a warm build that does not hit everything
the cold build compiled, a cache write error, or server and client-side
mode counting differently. Comparing the warm hits to what was compiled,
not only checking for misses, matters: a client whose connection breaks
loses its stats, and with them the misses that would show the entry was
never stored. --large-entries also checks that client-side mode caches
entries over a small frame limit; main does not yet, so CI leaves it
off. Report the times in the job summary, and fail only on a median
regressing by more than 30%, since shared runners are noisy.

scripts/e2e-bench.sh runs locally too.
@sylvestre
sylvestre marked this pull request as ready for review November 20, 2026 13:15
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.

2 participants