[Git][ghc/ghc][master] 2 commits: testsuite: Drop peak_megabytes_allocated from LinkableUsage tests
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7b27f25a by Simon Jakobi at 2026-08-14T06:26:54-04:00 testsuite: Drop peak_megabytes_allocated from LinkableUsage tests LinkableUsage01/02 collected all metrics with a 2% tolerance. For peak_megabytes_allocated, whose granularity is 1 MB, that window is under 0.7 MB at this test's ~34 MB peak, so any 1 MB step failed the test (#27613, #27489). Drop that metric: max_bytes_used guards the Linkable-retention property with byte granularity, at a tolerance that still comfortably exceeds the noise observed in CI. Assisted-by: Claude Fable 5 - - - - - e5de423b by Simon Jakobi at 2026-08-14T06:26:54-04:00 testsuite: Don't truncate fractional baselines when computing bounds RelativeMetricAcceptanceWindow.get_bounds truncated the baseline with int() before applying the tolerance. Baselines can be fractional (they are averaged over several measurements), so this skewed the acceptance window downwards: in #27613, a baseline of 33.67 at 2% tolerance yielded bounds (32, 34) instead of (32, 35), rejecting a measurement that was within tolerance. Assisted-by: Claude Fable 5 - - - - - 2 changed files: - testsuite/driver/perf_notes.py - testsuite/tests/bytecode/TLinkable/all.T Changes: ===================================== testsuite/driver/perf_notes.py ===================================== @@ -156,8 +156,8 @@ class RelativeMetricAcceptanceWindow(MetricAcceptanceWindow): self.__tol = tol def get_bounds(self, baseline: float) -> Tuple[float, float]: - lowerBound = trunc( int(baseline) * ((100 - float(self.__tol))/100)) - upperBound = trunc(0.5 + ceil(int(baseline) * ((100 + float(self.__tol))/100))) + lowerBound = trunc( baseline * ((100 - float(self.__tol))/100)) + upperBound = trunc(0.5 + ceil(baseline * ((100 + float(self.__tol))/100))) return (lowerBound, upperBound) ===================================== testsuite/tests/bytecode/TLinkable/all.T ===================================== @@ -3,7 +3,8 @@ # after they have been loaded into the `LoaderState`. # However, this property is currently not validated automatically. test('LinkableUsage01' - , [ collect_compiler_stats('all', 2) + , [ collect_compiler_stats('bytes allocated', 2) + , collect_compiler_stats('max_bytes_used', 5) , extra_files(['genLinkables.sh', 'BCOTemplate.hs']) , pre_cmd('$MAKE -s --no-print-directory LinkableUsage01_Prep') , req_bco @@ -18,7 +19,8 @@ test('LinkableUsage01' # Performance test for bytecode `Linkable`s. test('LinkableUsage02' - , [ collect_compiler_stats('all', 2) + , [ collect_compiler_stats('bytes allocated', 2) + , collect_compiler_stats('max_bytes_used', 5) , extra_files(['genLinkables.sh', 'BCOTemplate.hs']) , pre_cmd('$MAKE -s --no-print-directory LinkableUsage02_Prep') , req_bco View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b19fcc1c0aa8ca80511fe733d8a23b6... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b19fcc1c0aa8ca80511fe733d8a23b6... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Marge Bot (@marge-bot)