Repository navigation
feat(bench): measure warm_incremental_s per arm in the artifact-serving bench - #2210
Merged
Merged
Conversation
…ng bench
Decision 6 of docs/design/artifact-serving-decisions.md lists
`warm_incremental_s` as the no-regression guard for the non-first-build case,
and the harness only measured the cold number. Each trial now runs a second
build in the SAME cache root after one line is appended to the sketch's own
translation unit, so the served arm answers from its cached prebuilt tree and
the control arm from its installed framework, and both numbers measure link
plus one recompiled unit.
A comment change would not do: the compiler's cache hashes what the
preprocessor produced, so a comment can hit the previous object and report a
warm build that compiled nothing. The probe is an external-linkage constant
(`extern "C" const unsigned fbuild_serving_probe_<n> = <n>u;`), which cannot be
elided, cannot warn as unused, and changes exactly one unit. The original bytes
are restored on every exit path and the restore is verified -- leaving the
caller's project edited is not an acceptable failure mode for a measurement.
Additive in the document: `warm_s` / `warm_incremental_s` are optional per arm,
schema stays 1, so a measurement written before this change still loads and
simply does not gate warm. The 10 % gate applies to the warm p50 as well when
both documents carry one, and a warm build failure names its phase ("served
warm arm exited ...") instead of being reported as a cold one.
Also corrects the module and ci/README notes that still listed
`bytes_downloaded` as open; #2207 records it in `prebuilt_libs`.
Tests (real output, TMPDIR=/tmp):
- `ci.test_artifact_serving_bench` 35 passed / 0 failed (7 new: the probe is
appended and restored, warm is reported per arm, a project with no .ino/.cpp
refuses to measure, a warm failure names its phase, a warm-only regression
fails the gate, a baseline without warm trials does not gate warm, and a
document without warm trials still loads).
- Full drift suite (the ci-workflow-drift unittest line) 661 passed / 0 failed.
- ruff format + check clean, `check_python_complexity` clean,
`check_python_types` 0 errors, `check_workflow_concurrency` OK,
`gate_script_coverage --budget 0` OK.
RED proven twice: with the probe write removed the rebuild/restore test fails
(0 != 2 warm builds) and the warm-failure test does not raise; with the warm
gate branch neutered the warm-regression test reads "pass" instead of "fail".
Both restored + touched and re-run green.
Still open for #1882 decision 6: `fallback_rung_histogram` -- the ladder does
not expose rung numbers yet, so recording one would be a fabricated histogram.
A real measurement still needs a published tree (maintainer bucket upload); the
nightly workflow stays green-and-idle until one appears.
#2196 stays open.
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.
feat(bench): measure warm_incremental_s per arm in the artifact-serving bench
Decision 6 of docs/design/artifact-serving-decisions.md lists
warm_incremental_sas the no-regression guard for the non-first-build case,and the harness only measured the cold number. Each trial now runs a second
build in the SAME cache root after one line is appended to the sketch's own
translation unit, so the served arm answers from its cached prebuilt tree and
the control arm from its installed framework, and both numbers measure link
plus one recompiled unit.
A comment change would not do: the compiler's cache hashes what the
preprocessor produced, so a comment can hit the previous object and report a
warm build that compiled nothing. The probe is an external-linkage constant
(
extern "C" const unsigned fbuild_serving_probe_<n> = <n>u;), which cannot beelided, cannot warn as unused, and changes exactly one unit. The original bytes
are restored on every exit path and the restore is verified -- leaving the
caller's project edited is not an acceptable failure mode for a measurement.
Additive in the document:
warm_s/warm_incremental_sare optional per arm,schema stays 1, so a measurement written before this change still loads and
simply does not gate warm. The 10 % gate applies to the warm p50 as well when
both documents carry one, and a warm build failure names its phase ("served
warm arm exited ...") instead of being reported as a cold one.
Also corrects the module and ci/README notes that still listed
bytes_downloadedas open; #2207 records it inprebuilt_libs.Tests (real output, TMPDIR=/tmp):
ci.test_artifact_serving_bench35 passed / 0 failed (7 new: the probe isappended and restored, warm is reported per arm, a project with no .ino/.cpp
refuses to measure, a warm failure names its phase, a warm-only regression
fails the gate, a baseline without warm trials does not gate warm, and a
document without warm trials still loads).
check_python_complexityclean,check_python_types0 errors,check_workflow_concurrencyOK,gate_script_coverage --budget 0OK.RED proven twice: with the probe write removed the rebuild/restore test fails
(0 != 2 warm builds) and the warm-failure test does not raise; with the warm
gate branch neutered the warm-regression test reads "pass" instead of "fail".
Both restored + touched and re-run green.
Still open for #1882 decision 6:
fallback_rung_histogram-- the ladder doesnot expose rung numbers yet, so recording one would be a fabricated histogram.
A real measurement still needs a published tree (maintainer bucket upload); the
nightly workflow stays green-and-idle until one appears.
#2196 stays open.