Repository navigation
MGT: tests/cobol_mainframe scans through scan_server (Part of #5882) - #5941
Merged
Merged
Conversation
~100 scans a Mainframe Ground Truth run each started a fresh `python -m gitgalaxy.galaxyscope` (~3.5 s of engine import on a runner for a few files' scan). They take tests/tools/scan_server.py's scan_to_db now (same argv, environment default, result and errors; it falls back to galaxy_ir.scan_to_db): 50 test modules' imports, tests/tools/refraction_differential.py (the 8 excerpt scans), and the refractor's own --scan in the two tests that run it in-process. A new tests/cobol_mainframe/conftest.py appends tests/tools to sys.path for them. test_template_file_lineage_4771 reads the pinned zecs clone's cached scan (mainframe_corpus.scan) instead of scanning it again. scan_server: a server belongs to the pid that started it (a forked child starts its own); the same change as PR #5932. The 52 changed test files, sequential, local: 182 s -> 75 s, 724 passed / 4 skipped both ways. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
Owner
Author
|
No description provided. |
Owner
Author
|
No description provided. |
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). Mainframe Ground Truth uses ~63 runner-h/day (10-21). Its pytest step is 69% of the parts' time, ~1,520 test-seconds a run.
Problem: about 100 scans a run each started a fresh
python -m gitgalaxy.galaxyscopethroughgalaxy_ir.scan_to_db. That is ~3.5 s of engine import on a runner, for a scan of a few files.test_vsam_repositoriesalone (115 test-s a run) does ~28.What it does:
scan_to_dbfromtests/tools/scan_server.py: same argv, sameGITGALAXY_DISABLE_GIT_HISTORYdefault, same DB path and errors, and it falls back togalaxy_ir.scan_to_db. It already servestest_galaxy_ir(tests: Mainframe Ground Truth's evidence, galaxy IR and javac-driven tests 2-4x faster #5914) and, in CI plans fixed + blobless checkouts; Smoke collection and slowest tests faster (Part of #5882) #5932, both gauntlets. The rewrite only movesscan_to_dbout of eachgalaxy_irimport line; nothing else in those files changed.tests/cobol_mainframe/conftest.pyappendstests/toolstosys.path(it shadows nothing), so every module can import it.tests/tools/refraction_differential.py: its 8 excerpt scans go through the server too.test_noscan_select_lineage/test_declared_code_page_readsrun the refractor's own--scanin-process. Itsscan_to_dbis monkeypatched to the server's.test_template_file_lineage_4771reads the pinned zecs clone's cached scan (mainframe_corpus.scan, which the parts already have) instead of scanning it again. It falls back to the old scan when the clone is not at its pin.scan_server: a server belongs to the pid that started it, so a forked child starts its own. This is the identical change in CI plans fixed + blobless checkouts; Smoke collection and slowest tests faster (Part of #5882) #5932, and the two merge cleanly in either order.Checked: the 52 changed test files, sequential, local:
Expected on CI: ~350 of ~1,520 test-seconds a run (~23% of MGT's pytest time), so ~6-8 runner-h/day at 10-21 volumes.
Measured and dropped (no gain):
test_det_nondigit_*'sjavaruns: tiny programs, ~18 ms a run, no differenceNot done:
test_assess_clean_install/test_assessfixtures per worker (--dist loadgroup, ~30 s a run). It changes how every test is distributed, so measure first.test_tool_regex_redos's CPU sweeps only when a tool changes (~30-40 s a PR). That's a policy call.🤖 Generated with Claude Code