Repository navigation
CICS Crucible: four cases at once per shard (--jobs 4), two shards (Part of #5882) - #5926
Merged
Merged
Conversation
…5882) A shard ran its ~11 cases one after another on a 4-vCPU runner: the case times add up to the shard's wall time (154 s of 155 s locally). cics_crucible.py --jobs N measures N cases at once, each in a spawned process (quiet() redirects a whole process's fds, so not threads); the parent prints each case's lines in case order and merges cells, coverage and the ports' actual / entries collectors, so results and log are the sequential run's. The workflow passes --jobs 4. Shard 1/4 on 4 pinned cores: 155 s -> 101 s; with #5922's C1 flags 57 s (2.7x). results.json cells / coverage / oracle / shard SAME at --jobs 2, 3 and 4; the log line for line the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
… at once (Part of #5882) Each measure job costs ~40 s of setup (checkout, clone, pip, JDK, Maven cache, oracle image) and a runner slot of the shared pool; with --jobs 4 two shards (22 / 21 cases, 607 / 608 recorded seconds) finish about with runner-tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
No description provided. |
Owner
Author
|
No description provided. |
squid-protocol
added a commit
that referenced
this pull request
Oct 22, 2026
… test is slow by design (Part of #5882) - test_unicode_gauntlet_scan_env / test_a_legacy_cjk_estate_...: they faked galaxy_ir.scan_to_db, which unicode_gauntlet.scan no longer calls (it takes scan_server's), so a real scan ran on a missing estate. They fake scan_server's now. - test_jobs_measure_the_cases_as_one_at_a_time_does (#5926): 18.2 s on a loaded runner tripped the 15 s time ratchet; --jobs 2 spawns two processes that each import the runner. Marked slow with that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
squid-protocol
added a commit
that referenced
this pull request
Oct 22, 2026
…ts faster (Part of #5882) (#5932) * CI plans: Smoke's sweep plan reads the PR's file list; plan checkouts blobless (Part of #5882) Smoke's checkout depth `event == 'pull_request' && 0 || 1` was always 1 (0 is falsy): every part then fetched main into a shallow clone (~60 s), found no merge base, and planned "full", so the ReDoS sweeps ran on every PR. The plan now reads the PR's own file list (gh api pulls/N/files, whole by changed_files, renames under both names); the part checks out one commit. On 20 recent PRs the API plan equals the git-diff plan (16 of them deselect the sweeps; each ran them). Det Sweep's and MGT's plan jobs keep full history but blobless (filter: blob:none): a clone of the repo took 1.2 s blobless vs 40 s full here; their checkouts took 74 s / 45 s on CI. merge-base, diff and git show behave the same (a blob is fetched when read; det_port's base worktree fetches its tree in one batch). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 * Smoke: collecting the suite ~18% faster (Part of #5882) Collection runs in every xdist worker of every part (~34 s a part on CI). Two costs: - tests/conftest.py _is_redos_sweep took Path.relative_to per item (18k items): 1.5 s of 8.3 s profiled. The directory test is now cached per file; the name test runs first. - test_workflow_draft_gate parsed every workflow twice at import with the pure-Python loader: once now, with libyaml's CSafeLoader where present (47 workflows load identically; 0.02 s vs 0.22 s). collect-only, warm: 4.45 s -> 3.65 s. The same 787 tests carry redos_sweep. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 * Smoke: the gauntlets scan through scan_server; the POSIX import guard parses 1 file in 11 (Part of #5882) - unicode_gauntlet / cultural_gauntlet: scan_to_db from tests/tools/scan_server.py (the engine imported once a process, not once a scan: ~20 / ~30 scans of a few files each). scan_server is fork-safe now: a server belongs to the pid that started it, so a forked ProcessPoolExecutor worker starts its own (unicode_gauntlet scans the seed before its pool forks). With GITGALAXY_SCAN_SERVER=0 vs on, both gauntlets' results are byte for byte the same (17 cells, 203 results); 4 cores: unicode 13.6 -> 7.8 s, cultural 16.5 -> 6.4 s. - test_posix_only_imports_4934: an import names its module as a word, so only files mentioning one are parsed (119 of 1346): 5.8 -> 2.1 s, still []. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 * Fix the red Smoke parts: gauntlet fakes patch scan_server; the --jobs test is slow by design (Part of #5882) - test_unicode_gauntlet_scan_env / test_a_legacy_cjk_estate_...: they faked galaxy_ir.scan_to_db, which unicode_gauntlet.scan no longer calls (it takes scan_server's), so a real scan ran on a missing estate. They fake scan_server's now. - test_jobs_measure_the_cases_as_one_at_a_time_does (#5926): 18.2 s on a loaded runner tripped the 15 s time ratchet; --jobs 2 spawns two processes that each import the runner. Marked slow with that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 * Drop the duplicate slow marker: main's #5940 already marks the --jobs test (Part of #5882) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5 --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Part of #5882 (CI speed). CICS Crucible has the slowest typical PR wait (p50 27 min on 10-21). Its runner time is the four
measureshards (~4-6 min each, ~85% of it in the measure step).Problem: each shard measured its ~11 cases one after another on a 4-vCPU runner. Locally the case times add up to the shard's wall time (154 of 155 s). Two-thirds of that is
mvn compile+mvn testcold JVMs, and a quarter is Python child processes. Most of it is single-threaded.What it does:
cics_crucible.py --jobs Nmeasures N cases at once, each in its own spawned process. It has to be processes, becausequiet()redirects a whole process's stdout/stderr fds.actual/entriescollectors, so the results and the log are the sequential run's.--jobs 1(the default) is unchanged.--jobs 4.Measured (shard 1/4, 12 cases, pinned to 4 cores like a runner):
--jobs 2--jobs 4--jobs 4+ #5922's C1 JVM flagsAt jobs 2, 3 and 4,
results.json's cells, coverage, oracle and shard were identical to the sequential run, and the printed log was the same line for line. #5922 and this PR are independent: each helps alone, and together they give the 2.7x.Test:
test_jobs_measure_the_cases_as_one_at_a_time_doesruns the fixture's two cases (engine-facts side, no Docker or Maven) at jobs 1 and 2 and requires identical cells and coverage. tests/cics_crucible/test_shards_5498.py + test_cics_crucible_runner.py: 97 passed, 2 skipped (the Docker e2e).Two shards, not four (owner's call, second commit). Each measure job costs ~40 s of setup and a slot of the shared runner pool. CI run 39687765264 (
--jobs 4, 4 shards, without #5922) measured 180 / 247 / 264 / 274 s a shard (205-340 s before): ~20% faster, because four cases' Maven JVMs fight over the runner's 4 vCPUs. So land this with or after #5922. Alone, 2 shards would be ~8 min measure jobs. With #5922's C1 flags the estimate is ~280 s a shard. The 2-shard plan balances 22 / 21 cases (607 / 608 recorded s); test_shards_5498 (matrix = --shard N = job name) passes.🤖 Generated with Claude Code