Repository navigation
perf(equivalence): cheaper Spring context per run: lazy JPA repositories, no web layer (Part of #8599) - #8643
Conversation
…zy JPA repositories, no web layer (Part of #8599) A Spring context per run was 93% of a warm mutant run (readcust: 1.05 s of 1.14 s; the program ~0.08 s). Every generated equivalence test (batch, CICS, CALL) now starts with equivalence_java.SPRING_TEST_PROPERTIES: spring.data.jpa.repositories.bootstrap-mode=lazy and spring.main.web-application-type=none (the test calls the service, never a controller; no generated class names a servlet type). nyx, the same recorded survivors, verdicts unchanged: readcust run 1.14 -> 0.73 s, UPDCUST run 1.84 -> 1.35 s. det_port.py run of readcust, UPDCUST, ABNDPROC, dateutil, zecs003: all proven, Java runs 81.0 -> 62.8 s. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Joe Esquibel <[email protected]>
|
No description provided. |
|
PR #8643 @ cc51bc5: 2 failed check(s) == db2 (failure) -- main == equivalence-e2e (failure) -- real |
|
No description provided. |
|
CI shepherd: the head of this PR (1c8e691) is not the one a maintainer labelled |
|
No description provided. |
|
PR #8643 @ 1c8e691: 16 failed check(s) == crucible (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == det (cancelled) -- infra == equivalence-e2e (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == measure (shard 2/4) (failure) -- real == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
PR #8643 @ 1c8e691: 16 failed check(s) == crucible (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == det (cancelled) -- infra == equivalence-e2e (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == measure (shard 2/4) (failure) -- real == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
No description provided. |
|
No description provided. |
Part of #8599 (L5 speed): the per-run Spring context.
Why
Each run of a proof starts its own Spring context (the generated test is
@DirtiesContext, so a session JVM's runs share no state). On a warm--one-jvmsession that startup was 93% of a mutant run: readcust takes 1.05 s of each 1.14 s run, while the program itself takes about 0.08 s. A batch survivor makes 7 runs (main plus 6 faults) and a CICS survivor at least one. Timings come from Spring's own "Started … in X s" lines, captured per in-session run.Summary
equivalence_java.SPRING_TEST_PROPERTIES, used by every generated test (batchequivalence_java, CICSequivalence_cics, both CALL templates inequivalence_call):spring.data.jpa.repositories.bootstrap-mode=lazy: repositories are built on first use.spring.main.web-application-type=none: the test calls the service, never a controller. No compiled class in the UPDCUST (350) or readcust (414) projects refers to a servlet or web-request type.@RestControllerbeans are still created; only the MVC layer is skipped.spring.jpa.show-sql=false, as before.tests/tools/test_spring_test_properties_8599.pypins all 4@SpringBootTesttemplates to the constant.docs/language_status/mutation_testing.md.These properties also apply to baseline proofs, so a context they break fails that case's proof in CI, loudly, rather than making mutants die quietly.
Measured (nyx, 2 jobs)
In-session mutant runs over the same recorded survivors, all verdicts unchanged:
spring.main.lazy-initialization=true(0.99 s) and quieter logging gained nothing, so they're left out.Whole proofs,
det_port.py runof readcust (batch + faults), UPDCUST (CICS), ABNDPROC (LINK-bytes facades), dateutil (CALL) and zecs003 (CICS WEB), main vs this PR: all proven on both. Their Java runs (java_direct) took 81.0 s → 62.8 s in total (readcust 40.3 → 31.0, UPDCUST 11.8 → 9.8, ABNDPROC 11.8 → 8.9, dateutil 5.6 → 3.5, zecs003 11.5 → 9.6). Whole-proof totals are noisier, since COBOL, javac and generate dominate them.Verification
pytestovertests/tools/test_equivalence_*.py,tests/cobol_mainframe/test_equivalence*.py, the mutation suites,test_java_subprocess_utf8and the new pin test: 1210 passed, 60 skipped.Not done
gitgalaxy.datasets.directory=${equivalence.datasets}), and the service beans hold program state, so that is a change to the isolation model, not a setting.Type of change
🤖 Generated with Claude Code