Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci: sample process CPU and priority during real capture

Richie McIlroy03e1488457e1
diff --git a/.github/workflows/verify-recording.yml b/.github/workflows/verify-recording.yml
index f6df0cdb1..b463d3219 100644
--- a/.github/workflows/verify-recording.yml
+++ b/.github/workflows/verify-recording.yml
@@ -92,7 +92,14 @@ jobs:
- name: Real-capture recording oracle
run: |
mkdir -p "$CAP_VERIFY_DUMP"
- top -l 0 -s 1 -n 15 -o cpu -stats pid,command,cpu,th,state,pri > "$CAP_VERIFY_DUMP/top.log" 2>&1 &
+ # One-second process samples (CPU, scheduler priority) so an
+ # environment failure can be attributed.
+ (while sleep 1; do
+ date -u +%H:%M:%S
+ ps -A -o pid,pri,%cpu,comm -r | head -14
+ stim=$(pgrep -f cap-verify-stimulus | head -1)
+ [ -n "$stim" ] && ps -M -p "$stim" | head -6
+ done) > "$CAP_VERIFY_DUMP/ps.log" 2>&1 &
top_pid=$!
start=$(date +%s)
set +e