feat(ci): gate CI on benchmark regression thresholds (#286)
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 noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Space Packet Parser
Documentation: https://space-packet-parser.readthedocs.io/en/latest/
Space Packet Parser is a package for decoding CCSDS telemetry packets according to an XTCE packet structure definition. It is based on the UML model of the XTCE spec and aims to support all but the most esoteric elements of the XTCE telemetry packet specification.
Resources:
Installation
From PyPI
To install the optional
sppCLI as well:From Anaconda (distributed on the
laspchannel):Proud Member of the Python in Heliophysics Community (PyHC)
Missions using Space Packet Parser