Repository navigation
test: size linearity timing tests above the Windows clock tick (#4840) - #4861
Merged
Merged
Conversation
On Windows `time.thread_time` advances in ~15.6 ms ticks, so a 16 ms small sample can be one tick: test_prism_suppression_regex_bomb read 0.0156 s vs 0.1250 s as 8.0x for a 4x input on the main matrix (run 38083925457). MIN_RELIABLE_S goes from 2 ms to 50 ms (>= 3 ticks), and the three callers whose small run was below that now use larger inputs, so the floor never masks a real quadratic. Measured best CPU of the small run on Linux: prism 138 ms, unterminated EXEC 77 ms, MOVE statements 158 ms (unchanged), unterminated DECLARE 112 ms; every ratio ~4x. Part of #4840 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
Owner
Author
|
Holding: shepherd:matrix + shepherd:merge removed until the macOS shard-3 hang fix (box tools, next PR) is on main; then main gets merged in here and both labels go back on, so one matrix run proves Windows (this PR) and macOS (that one). |
Owner
Author
|
No description provided. |
Contributor
Owner
Author
|
No description provided. |
1 similar comment
Owner
Author
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4840
Why
test_prism_suppression_regex_bombfailed on windows / 3.10 in the main matrix (run 38083925457):0.0156 svs0.1250 sread as 8.0x for a 4x input. On Windowstime.thread_timeadvances in ~15.6 ms ticks, so the small sample was a single tick, not a measurement.Change
tests/_timing.py:MIN_RELIABLE_S2 ms → 50 ms (≥ 3 Windows ticks).max(t_small, MIN_RELIABLE_S), so a small run under it would make the ratio lenient and hide a quadratic. Every caller is sized so the small run clears 50 ms honestly (best CPU, Linux):The four tests run in ~12 s together.
Checks
pr_gates --fastPASS.--ratchets: all PASS exceptports, which fails locally because the CardDemo corpus is not fetched at its pinned ref (mainframe_corpus.py fetch ...): environment, not this change (tests only).shepherd:matrixruns the OS matrix to prove it on Windows.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX