Repository navigation
Report CPU time to guests - #1756
Queued
Weidong Cui (wdcui) wants to merge 5 commits into
Queued
Weidong Cui (wdcui) wants to merge 5 commits into
Weidong Cui (wdcui) wants to merge 5 commits into
Conversation
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/cpu-time
branch
2 times, most recently
from
October 31, 2026 18:48
df624b1 to
f5f9769
Compare
Add a platform CpuTimeProvider for thread and process CPU time, measure each runner's CPU time when the userland broker reaps it, and account collected children's CPU time in the broker process tree. The Linux shim uses these for the CPU-time clocks, getrusage, times, wait4 rusage, and SIGCHLD si_utime/si_stime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Decode negative clock IDs, such as those from clock_getcpuclockid and pthread_getcpuclockid, into CPU clocks, and serve those naming the calling process or thread. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/cpu-time
branch
from
November 1, 2026 23:13
f5f9769 to
3824f96
Compare
Fold the CPU-time queries into litebox_platform's TimeProvider, with defaults that report CPU time as unavailable, and move CpuTime next to it so both LiteBox and broker platforms can use them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Weidong Cui (wdcui)
marked this pull request as ready for review
November 2, 2026 01:24
Weidong Cui (wdcui)
added this pull request to the merge queue
Nov 2, 2026
Any commits made after this event will not be merged.
|
🤖 SemverChecks 🤖 Click for details |
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.
This PR reports CPU time to guests. The platform TimeProvider gains thread and process CPU-time queries, implemented on Linux, Windows, and macOS userland, and the broker records each runner's CPU time when it exits and accumulates it up the process tree as exits are collected. The Linux shim uses these to serve CPU-time clocks (including the caller's clock_getcpuclockid/pthread_getcpuclockid clock IDs), getrusage, times, wait4 resource usage, and SIGCHLD si_utime/si_stime.