Repository navigation
feat(bench): measure the artifact-serving arms and gate the ratio (#1882 decision 6 / #2196) - #2206
Merged
Merged
Conversation
Decision 6 of docs/design/artifact-serving-decisions.md is the last cell of #1882, and #2196 is the consumer it was waiting for. It asks for one headline number WITH its control arm -- cold_first_compile_wall_s served vs the --no-prebuilt-libs source arm in the same job -- plus a 10 % regression gate on the reference cell. ci/artifact_serving_bench.py: - --measure runs both arms of a cell, each trial with its own empty FBUILD_CACHE_DIR, so the number is a first compile and not a framework reuse; the served arm passes the hidden --prebuilt-core opt-in, the control arm the public --no-prebuilt-libs. Writes <YYYY-MM-DD>.json plus a recency-gated latest.json (an older run never replaces a newer measurement). - It reads what the build already records -- prebuilt_libs in build_info_<env>.json (#2196 cell 4) -- and REFUSES to report a served arm whose record says used: false. A ratio from two source builds reads as a 1.00x speedup and measures nothing, which decision 6 calls a hard failure. - --check applies the 10 % gate to the newest measurement against latest.json, exits 3 under --fail, and never gates a non-reference cell. Remaining for #1882 cell 6, deliberately out of scope here: the nightly step that invokes --measure, bytes_downloaded (needs a network counter) and fallback_rung_histogram (the ladder exposes no rung numbers yet).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Decision 6 of
docs/design/artifact-serving-decisions.mdasks for one headlinenumber with its control arm and a 10 % regression gate. #2196
built the consumer the measurement needs (the ladder is now consulted from the
ESP32 packages stage and every build records
prebuilt_libsinbuild_info_<env>.json), so the measurement side can be written.ci/artifact_serving_bench.py(additive; no new crate, no new dependency):--measureruns both arms of a cell. Every trial gets its own emptyFBUILD_CACHE_DIR, so the number is a first compile and not a frameworkreuse; the served arm passes the hidden
--prebuilt-coreopt-in, the controlarm the public
--no-prebuilt-libs. Writes<YYYY-MM-DD>.jsonand arecency-gated
latest.json— the same overlap ruleci/publish_bench_site.pyapplies to the site overlay, so a run that finisheslast never hands the site an older measurement.
prebuilt_libsfrombuild_info_<env>.json(cell 4,prebuilt_record.rs) — and refuses toreport a served arm whose record says
used: false. A ratio computed fromtwo source builds reads as a 1.00x "speedup" and measures nothing; decision 6
calls a fallback in CI a hard failure, so the arm raises instead of emitting a
row. The control arm is checked from the other side: it must report
used: false.--checkgates the newest measurement againstlatest.jsonfor thereference cell (
esp32s3xframework-arduinoespressif32-libs/core-3.3.12xubuntu-22.04), exits 3 under--fail, treats exactly 10 % as insidethe budget (the decision says "more than 10 %"), and reports a non-reference
cell without ever gating it.
Evidence (real output)
Full drift suite exactly as
ci-workflow-drift.ymlruns it:RED proofs (scripted revert of the real code, then restore +
touch):enforce_arm's served-arm check weakened ->test_a_served_arm_that_fell_back_to_source_is_not_a_measurementfails.change >= budget->test_exactly_ten_percent_is_inside_the_budgetfails.Both were the only failures (11 passed / 2 failed), and the restored file is
green again.
Registration: the new test module is listed in
ci/local_suites.DRIFT_UNITTEST_MODULESand in the drift workflow's unittest step (same order —
test_local_suitescompares the sequences), and
ci/README.mdcarries the entry.Not in this PR (honest limits)
--measure. Decision 6's cadence is a workflowchange and a runner decision, not this script.
bytes_downloadedper arm (needs a network counter in the harness) andfallback_rung_histogram(the ladder does not expose rung numbers); thedocument carries
bytes_downloaded: nullrather than a guessed value.prebuilt tree for the cell's fingerprint, and publishing is a maintainer
bucket action (mirror: state db drift, generator drops esp-toolchain, rejected UA, no release tracking #2040/audit: hard-coded vendor download URLs that bypass the fbuild mirror bucket (#2029 leftover) #2128).
#2196 stays open. No close keyword.