feat(rescore): log a pass's CPU time and assertion expiries beside its elapsed time - #2297
Merged
Merged
Conversation
4 tasks
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.
What this PR does
Adds one always-on line after
re-score: done:cpuis process CPU time (getrusage, user + system) across the pass.assertionExpiredcounts how many times thenoop.rescoreexecution assertion's expiry handler fired during the pass.Why
It answers the question raised on #2280, which the log could not answer until now.
re-score: done … in N msis uptime, and uptime keeps running while the process is suspended, so a long elapsed time looks the same in both of these cases:Neither leaves a
cpu_resource_fatal, and only the first means a backgrounded pass reliably finishes. CPU time next to elapsed time separates them: a pass that spends a few percent of its elapsed time on CPU was mostly suspended, andassertionExpiredsays whether the grant ran out on the way.It also covers the safety-net concern from that review. If pacing stops holding the limit on some device,
cpuShareclimbs towards the limit before any kill, and a kill still shows up on the next launch as the #1538resuming a pass an earlier attempt could not finishline.Type of change
How it was tested
RescoreBackgroundSchedulerTests: the line format for the field shape and for an unreadable CPU clock, and process CPU time advancing under load. The suite passes (23 tests).doc_comment_lint.pyis clean;parity_ratchet.py --base upstream/main --offlinereports 0 errors.Checklist
docs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystores