Skip to content

MGT: tests/cobol_mainframe scans through scan_server (Part of #5882) - #5941

Merged
squid-protocol merged 2 commits into
mainfrom
perf/5882-mgt-scan-server
Oct 22, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
perf/5882-mgt-scan-server

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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.galaxyscope through galaxy_ir.scan_to_db. That is ~3.5 s of engine import on a runner, for a scan of a few files. test_vsam_repositories alone (115 test-s a run) does ~28.

What it does:

Checked: the 52 changed test files, sequential, local:

main this PR
wall 182 s 75 s
result 724 passed, 4 skipped 724 passed, 4 skipped

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):

Not done:

  • grouping test_assess_clean_install / test_assess fixtures per worker (--dist loadgroup, ~30 s a run). It changes how every test is distributed, so measure first.
  • running 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

squid-protocol and others added 2 commits October 21, 2026 20:19
~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
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 2e93abd into main Oct 22, 2026
27 checks passed
@squid-protocol
squid-protocol deleted the perf/5882-mgt-scan-server branch October 22, 2026 01:53
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant