Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
==========================================
- Coverage 94.86% 94.72% -0.14%
==========================================
Files 50 47 -3
Lines 4321 4209 -112
==========================================
- Hits 4099 3987 -112
Misses 222 222 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation changes are reviewed; the only finding is a non-blocking nit about an issue reference.
Pull request overview
Documents the CTIM XTCE parsing benchmark as a manual performance regression guard.
Changes:
- Adds CTIM benchmark context, history, budget, and comparison workflow.
- Documents benchmark guidance for contributors.
- Records the update in the unreleased changelog.
File summaries
| File | Summary |
|---|---|
docs/source/developers.md |
Adds benchmark guidance and workflow. |
docs/source/benchmarking.md |
Documents CTIM’s regression-guard purpose. |
CHANGELOG.md |
Records the documentation update. |
Review details
Suppressed comments (1)
docs/source/benchmarking.md:293
- The PR description says follow-up issue #285 tracks designing this CI gate, but repository issue #285 is actually about invalid
CITATION.cffmetadata and is unrelated. Please correct the issue reference in the PR description (or omit it) so the rationale for leaving enforcement manual remains traceable.
budget is currently a manual step. If you are touching `space_packet_parser/xtce/`, run the
comparison above before opening a PR.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
medley56
commented
Sep 17, 2026
medley56
force-pushed
the
147-add-documentation-of-xtce-parsing-benchmarking
branch
2 times, most recently
from
September 18, 2026 17:35
4705f8f to
f82fdd4
Compare
Every test in tests/benchmark/ now asserts its mean run time against a threshold declared next to it, enforced on ubuntu-latest for each supported Python version. Thresholds are in seconds on a nominal machine and are scaled by a per-test measurement of the runner's speed (a fixed pure-Python reference workload timed immediately before each benchmark), which removes most of the run-to-run variation in GitHub runner hardware. They are calibrated from the normalized means of six CI runs at about 1.5x the average, never below 1.2x the largest value observed. - tests/benchmark/conftest.py: machine_speed_factor and assert_within_threshold fixtures; the check is enforced only when SPP_BENCHMARK_GATE is set, so a plain local run just reports timings - ci.yml: the coverage-instrumented test step passes --benchmark-disable; a separate uninstrumented gate step runs on ubuntu-latest with SPP_BENCHMARK_GATE=1, writes the normalized means to the step summary and uploads benchmark.json as an artifact - Fast bit-reading benchmarks run 1000 pedantic rounds instead of 3; packet-parsing benchmarks let pytest-benchmark calibrate rounds - codecov.yml ignores tests/benchmark/, which never runs instrumented - Document the gate and how to recalibrate in developers.md, point the benchmarking page's regression-guard section at it, add a CHANGELOG entry Closes #147 Closes #287 Co-Authored-By: Claude Fable 5.1 <[email protected]>
medley56
force-pushed
the
147-add-documentation-of-xtce-parsing-benchmarking
branch
from
September 18, 2026 18:45
f82fdd4 to
4581bcb
Compare
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.
Summary
CI now fails the build when a benchmark in
tests/benchmark/regresses. Every benchmark test asserts its mean run time against a threshold declared next to it, enforced onubuntu-latestfor each supported Python version (3.10 to 3.14).How the gate works
machine_speed_factorfixture intests/benchmark/conftest.pytimes a fixed pure-Python reference workload immediately before each benchmark and the threshold is scaled by it. This removed most of the run-to-run swing in the means (Linux CV fell from 10 to 35% to 1 to 12%).ubuntu-latest. The other OSes still run the benchmark tests functionally under--benchmark-disable.SPP_BENCHMARK_GATEis set, which the CI gate step does. A plainpytest tests/benchmark/locally just reports timings, so developers on other hardware are not gated against x86-runner thresholds."default"per test covers all versions; a version-specific key can be added if one ever needs it. At 1.25x margins two of three validation runs produced one false positive each (a runner-class shift and a burst of slow rounds), which is why the margin is 1.5x.CI changes
--benchmark-disable, since coverage tracing distorts timings.tests/benchmark/onubuntu-latestwithSPP_BENCHMARK_GATE=1.benchmark.jsonas abenchmark-py<version>-attempt<n>artifact, so recalibration does not require log scraping.codecov.ymlignorestests/benchmark/, which by design never runs instrumented.Benchmark changes
pedanticrounds instead of 3, so a stall of a few milliseconds moves the mean by a few percent rather than twenty.Documentation
developers.mdgains a short### Benchmarkssection describing the gate and how to recalibrate.benchmarking.mdgains a### Regression Guardnote explaining the fixed bug the CTIM benchmark guards against and pointing at the developer docs.[Unreleased].Verification
--benchmark-disable; forcing an absurd threshold fails the test.make htmlbuilds with no new warnings.Closes #147
Closes #287
🤖 Generated with Claude Code