Repository navigation
fix(testing): time scaling checks by thread CPU time so a contended runner cannot skew the ratio - #10375
Merged
Conversation
…unner cannot skew the ratio
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] This PR appears safe to merge. Summary
No actionable issues were found. This review checked source and configuration; it did not run tests. Reviews (1) · Last reviewed commit: "fix(testing): time scaling checks by thr..." · Reviewed by Greptile |
This branch was previously deployed
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.
Summary
expectLinearGrowth(@sim/testingscaling helper) times a step atnand8nand bounds the ratio at 20 (linear ≈ 8x, quadratic 64x). It measured wall clock. On a contended runner the long large-input call spans many scheduler slices and absorbs the whole slowdown, while a short small-input call often fits in one. That skews the ratio upward, and keeping the best of five runs can't remove a one-sided error.workflow-code's "finds the cycles of a block wired to many targets in linear time" failed this way in CI (21.45 vs 20), with the runner 5–11x slower than idleprocess.threadCpuUsage, Node 22.19+, which CI runs), read throughglobalThisbecause the helper also compiles in packages without Node types (@sim/table-cells). Where a runtime doesn't report it, the clock stays wall time. One sample is also capped at 1s of wall clock, so a starved runner takes fewer calls instead of timing outType of Change
Testing
stronglyConnected(includesover the index keys) still fails: 75.6 vs 20. Revertedtable-cellsandtestingtype-check. biome,check:comment-hygieneChecklist
test-auditauthoring gate)