Sample CPU time for actions and report it with resource usage - #2690
Closed
amankrx wants to merge 1 commit into
Closed
Sample CPU time for actions and report it with resource usage#2690amankrx wants to merge 1 commit into
amankrx wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Better to handle this directly in #2687 |
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 and why
Part of #2614 (Separating the PR out, since this feature is getting quite big).
execution_cpu_timewas removed in #2599 because nothing reported CPU time.The worker already samples the action's process group every 250ms for peak memory, reading
/proc/<pid>/statfor the process group id.utimeandstimeare in that same line, so this reads them while it is already there and reports the total ascpu_time_msonActionResourceUsage.That message already flows to the scheduler and out as an origin event, so the value reaches the BEP pipeline with no further plumbing.
How this was verified
Added unit tests for the parser.
Risk
Low, and confined to Linux workers.
This change is