Repository navigation
test: measure CPU time in the html_to_text linearity test - #2384
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2384 +/- ##
==========================================
+ Coverage 94.05% 94.10% +0.04%
==========================================
Files 184 184
Lines 13662 13662
==========================================
+ Hits 12850 12856 +6
+ Misses 812 806 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
November 2, 2026 14:02
apify-factory
approved these changes
Nov 2, 2026
apify-factory
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, nothing blocking.
🏭 Apify Factory auto approved ✅ — the juror tried very hard to object and could not
Every gate passed, and neither the reviewer nor a juror found anything a human needs to look at.
Approval locked to 70af630f1 · workflow run
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.
test_html_to_text_is_linear_in_node_count(added in #2372) failed intermittently in CI, mostly on macOS, for both parsers and on unrelated PRs. It timed the 20k-node runs and then the 80k-node runs withperf_counter, each size in its own window a few seconds long. When other xdist workers got busy during one of those windows, the wall-clock ratio went past 10 even though the code is linear.The test now measures the process's own CPU time with
time.process_time()and alternates the small and large runs, so both sizes see the same load. The threshold stays at 10.Locally, with CPU load switching on and off on all cores, the old test failed 3 times out of 24 and the new one passed 100 times out of 100. With the quadratic code from before #2372 restored, it still fails for both parsers at a ratio of about 16.
✍️ Drafted by Claude Code