@@ -555,11 +555,11 @@ def test_performance_inner_loop_count_and_timing(self, java_project):
555555 )
556556
557557 # Total should be sum of 2 minimums (one per inner iteration) ≈ 20ms
558- # Minimums filter out JIT warmup, so use tighter ±2 % tolerance
558+ # Minimums filter out JIT warmup, so use tighter ±3 % tolerance
559559 expected_total_ns = 2 * expected_ns
560- assert expected_total_ns * 0.98 <= total_runtime <= expected_total_ns * 1.02 , (
560+ assert expected_total_ns * 0.97 <= total_runtime <= expected_total_ns * 1.03 , (
561561 f"total_passed_runtime { total_runtime / 1_000_000 :.3f} ms not close to expected "
562- f"{ expected_total_ns / 1_000_000 :.1f} ms (2 inner iterations × 10ms each, ±2 %)"
562+ f"{ expected_total_ns / 1_000_000 :.1f} ms (2 inner iterations × 10ms each, ±3 %)"
563563 )
564564
565565 def test_performance_multiple_test_methods_inner_loop (self , java_project ):
@@ -648,9 +648,9 @@ def test_performance_multiple_test_methods_inner_loop(self, java_project):
648648 )
649649
650650 # Total should be sum of 4 minimums ≈ 40ms
651- # Minimums filter out JIT warmup, so use tighter ±2 % tolerance
651+ # Minimums filter out JIT warmup, so use tighter ±3 % tolerance
652652 expected_total_ns = 4 * expected_ns # 4 test cases × 10ms each
653- assert expected_total_ns * 0.98 <= total_runtime <= expected_total_ns * 1.02 , (
653+ assert expected_total_ns * 0.97 <= total_runtime <= expected_total_ns * 1.03 , (
654654 f"total_passed_runtime { total_runtime / 1_000_000 :.3f} ms not close to expected "
655- f"{ expected_total_ns / 1_000_000 :.1f} ms (2 methods × 2 inner iterations × 10ms, ±2 %)"
655+ f"{ expected_total_ns / 1_000_000 :.1f} ms (2 methods × 2 inner iterations × 10ms, ±3 %)"
656656 )
0 commit comments