Skip to content

ci: the test checks' wall time, measured and cut - #701

Merged
rusholme merged 2 commits into
mainfrom
ci/walltime
Dec 5, 2026
Merged

rusholme merged 2 commits into
mainfrom
ci/walltime

Conversation

@rusholme

@rusholme rusholme commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

The unit-tests check grew from about 250 s (2026-11-13) to 355 s (2026-12-04), and it was the longest of the checks on every pull request. On this branch: unit-tests 307 s to 89 s, foundation 165 s to 113 s; the container check (about 140 s, untouched) is now the longest.

  • Where the time went. 104 of the unit suite's 186 s were in tests/unit/test_difference_stage.py, nearly all inside compute_clip_corr: ten million normal draws (0.4 s), six times per difference-stage run, with the same n-sigma and seed each time. A seeded call is a pure function of its two arguments, so the result is now computed once per process. The value is unchanged, and an unseeded call still draws afresh every time, as dev does. A difference or reference job saves about 2 s.
  • Install. unit-tests.yml and foundation.yml install the same requirements.txt with uv instead of pip (50 to 60 s of each run, now about 10 s).
  • Next time. Both test steps print their 25 slowest tests (--durations=25), so a future creep is read from a log.
  • Five tests that no longer earned their place (a read of every test in tests/): the test of database/2026-11-24-datasets.sql, a dated file applied once on 2026-11-30; an exact duplicate of the default-jitter test in test_connection.py; two of three interpreter launches in test_catalog_store.py's command-line test; the square shape in test_sfft_lowmem.py, weaker than the unequal one at 7 s of compilation; an unused constant in tests/support/fakereftools.py.

Implements no rapid_docs page: CI, tests and one internal cache, no behaviour change.

🤖 Generated with Claude Code

rusholme and others added 2 commits December 5, 2026 03:19
The unit-tests check grew from 250 s to 355 s between 2026-11-13 and
2026-12-04. 104 of the suite's 186 s were in tests/unit/test_difference_stage.py,
nearly all of it compute_clip_corr: ten million normal draws, 0.4 s, six
times per difference-stage run with the same n-sigma and seed. A seeded
call is a pure function, so its result is now computed once per process
(same value; an unseeded call still draws afresh, as dev does). The suite
runs in 63 s where it took 190 s, on the same host; a difference or
reference job saves about 2 s.

The two test workflows install with uv (pip took 50 to 60 s of each run)
and print the 25 slowest tests, so the next creep is read from a log.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- tests/db/test_datasets.py: the test of database/2026-11-24-datasets.sql,
  a dated file applied to SMDC once, on 2026-11-30, and never again.
- tests/unit/test_connection.py: test_jitter_true_samples_within_zero_and_delay
  ran the default-jitter test's path with its inputs and its one assertion.
- tests/unit/test_catalog_store.py: the command-line test launched three
  interpreters; one proves the entry point, the subcommands are tested
  in-process.
- tests/unit/test_sfft_lowmem.py: the square shape, weaker than the unequal
  one (it cannot show rows and columns exchanged) at 7 s of compilation.
- tests/support/fakereftools.py: UNIT_FILTER, read by nothing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@rusholme
rusholme merged commit 22263a9 into main Dec 5, 2026
5 checks passed
@rusholme
rusholme deleted the ci/walltime branch December 5, 2026 03:34
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.

1 participant