Skip to content

Sample CPU time for actions and report it with resource usage - #2690

Closed
amankrx wants to merge 1 commit into
TraceMachina:mainfrom
amankrx:feat/execution-cpu-time
Closed

Sample CPU time for actions and report it with resource usage#2690
amankrx wants to merge 1 commit into
TraceMachina:mainfrom
amankrx:feat/execution-cpu-time

Conversation

@amankrx

@amankrx amankrx commented Aug 13, 2026

Copy link
Copy Markdown
Member

What and why

Part of #2614 (Separating the PR out, since this feature is getting quite big). execution_cpu_time was 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>/stat for the process group id. utime and stime are in that same line, so this reads them while it is already there and reports the total as cpu_time_ms on ActionResourceUsage.

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 Reviewable

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nativelink Ready Ready Preview Aug 13, 2026 12:12pm
nativelink-aidm Ready Ready Preview Aug 13, 2026 12:12pm

Request Review

@amankrx

amankrx commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

Better to handle this directly in #2687

@amankrx amankrx closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant