Repository navigation
🧪 test: replace wall-clock checks with a bench - #975
Merged
Merged
Conversation
The XML duplicate-attribute and IDNA input-cap checks compared wall-clock time, so a loaded runner turned unrelated jobs red at random. The IDNA check now asserts the deterministic result past the cap, and a 1,000-prefix parse-xml-prefixes case gated in CodSpeed guards the quadratic duplicate check instead: reverting tox-dev#955 raises its instruction count by 57%. closes tox-dev#969
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.
Two checks added with #955 and #966 compared wall-clock time to show that duplicate-attribute detection and the IDNA input cap stay linear. On a loaded runner the ratio crossed its threshold on unmodified
main, sotest_xml_duplicate_detection_scales_linearlyfailed 3.14t on macOS in #972 for a change that touches no XML code.The IDNA check now asserts what the cap guarantees without a clock: past 16384 code points
normalize_urlreturns the host in its Unicode form. The XML check moves to the CodSpeed gate, which counts instructions and does not drift with load. ⚡parse-xml-prefixesgains a 1,000-prefix case, gated asparse-xml-prefixes-wide; under callgrind, reverting #955 raises its instruction count by 57%, and the existingparse-xml-attrsandparse-xml-prefixescases by 12% and 36%.closes #969