Files
hyprland-headless-stream-pl…/spikes/capture-speed/run-remaining.sh
T
Hermenix bf0667303e spike: --resume for the runner, and run the matrix from a transient unit
Two attempts were reaped mid-run by agent lifecycle cleanup (exit 143 with no
error line); a nix-shell process tree of tens of minutes belongs in a systemd
transient unit, not an agent background process. --resume skips any cell whose
result file already exists, so a kill costs the cell in flight and nothing else.
2026-10-11 16:25:38 +00:00

36 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Finish the capture-speed matrix, resumably.
#
# Run this through a *transient systemd unit*, not as an agent background
# process: `nix-shell --run` here is a long-lived process tree, and two earlier
# attempts were reaped mid-run by agent lifecycle cleanup (exit 143 SIGTERM with
# no error line). A unit leaves that tree entirely, and `--resume` means a kill
# costs only the cell that was in flight.
#
# sudo systemd-run --unit=hhs-bench --collect --property=User=hermes \
# --setenv=PATH=/run/current-system/sw/bin:/usr/bin:/bin \
# --setenv=WAYLAND_DISPLAY=/run/hypr-stream/wayland-1 \
# --working-directory=<spike> <spike>/run-remaining.sh
#
# Progress: journalctl -u hhs-bench -f
# Stop: sudo systemctl stop hhs-bench
set -u
cd "$(dirname "$0")"
run_pass() {
local label="$1" output="$2" results="$3"
echo "########## $label ($output) ##########"
nix-shell shell.nix --run \
"python3 bench.py --output $output --frames 200 --warmup 10 --runs 2 \
--control-seconds 10 --resume --results $results"
echo "########## $label done: rc=$? ##########"
}
# The moving-screen pass is complete except whatever a kill interrupted.
run_pass "PASS A: moving screen" hh-chromium-qshilo results/motion
# The still pass is the one that shows a route's own cost -- the animated page
# saturates both cores by itself, so the motion pass mostly measures the page.
run_pass "PASS B: still screen" hh-chromium-nxopdz results/still
echo "########## matrix complete ##########"