3131_MAX_AFTER_PROJECT_REWRITE_TO_COLD_RATIO : float = 0.8
3232_MAX_EDIT_TO_COLD_RATIO : float = 0.70
3333# Writing the cache during a cold compile must stay a small same-runner cost over --no-cache.
34- _MAX_CACHE_WRITE_CPU_OVERHEAD_RATIO : float = 1.10
35- _MAX_CACHE_WRITE_WALL_OVERHEAD_RATIO : float = 1.20
36- _MAX_LARGE_CACHE_WRITE_CPU_OVERHEAD_RATIO : float = 1.15
34+ # CPU time is the tight guard because it is steady on shared runners; the looser wall-time
35+ # backstop still catches lost parallelism, lock waits and write I/O regressions.
36+ _MAX_CACHE_WRITE_CPU_OVERHEAD_RATIO : float = 1.25
37+ _MAX_CACHE_WRITE_WALL_OVERHEAD_RATIO : float = 1.35
3738
3839
3940@pytest .mark .performance
123124 expected_edit_max_wall_seconds = 13.5 ,
124125 expected_max_warm_to_cold_ratio = _MAX_WARM_TO_COLD_RATIO ,
125126 expected_max_edit_to_cold_ratio = _MAX_EDIT_TO_COLD_RATIO ,
126- expected_max_cache_write_cpu_overhead_ratio = _MAX_LARGE_CACHE_WRITE_CPU_OVERHEAD_RATIO ,
127+ expected_max_cache_write_cpu_overhead_ratio = _MAX_CACHE_WRITE_CPU_OVERHEAD_RATIO ,
127128 expected_max_cache_write_wall_overhead_ratio = _MAX_CACHE_WRITE_WALL_OVERHEAD_RATIO ,
128129 # Temporary memory exception (2026-10-10); remove after conversion optimisation.
129130 expected_max_rss_bytes = 3008 * _MIB ,
@@ -180,11 +181,12 @@ def test_given_semantic_project_when_compiling_across_processes_then_cache_is_in
180181 }
181182 for label , measurement in measurements .items ():
182183 _LOGGER .info (
183- "fresh-process cache models=%d path=%s wall=%.3fs peak_rss_bytes=%d "
184+ "fresh-process cache models=%d path=%s wall=%.3fs cpu=%.3fs peak_rss_bytes=%d "
184185 "fingerprint=%s metrics=%s" ,
185186 test_case .model_count ,
186187 label ,
187188 measurement .elapsed_seconds ,
189+ measurement .cpu_seconds ,
188190 measurement .peak_rss_bytes ,
189191 measurement .semantic_fingerprint ,
190192 fresh_process_compile_cache_metrics (measurement ),
@@ -204,8 +206,8 @@ def test_given_semantic_project_when_compiling_across_processes_then_cache_is_in
204206 cache_write_wall_ratio ,
205207 cache_write_cpu_ratio ,
206208 )
207- assert cache_write_wall_ratio <= test_case .expected_max_cache_write_wall_overhead_ratio
208209 assert cache_write_cpu_ratio <= test_case .expected_max_cache_write_cpu_overhead_ratio
210+ assert cache_write_wall_ratio <= test_case .expected_max_cache_write_wall_overhead_ratio
209211 for measurement in (
210212 result .warm ,
211213 result .after_leaf_edit ,
0 commit comments