#!/bin/bash # Ring x pipe grid for the PACED rig (STATUS item 4, FINDINGS 51). # # tools/bench/pace_sweep.sh "" "" # # Every cell is a full 120-frame decode on the emulated 68000, pixel-verified. # There is no default rate list: FINDINGS 50 removed the delivery constant from # this tree and a sweep that invented one back would be the same mistake with # more rows. `0` means an unlimited pipe, which measures the RING's ceiling with # delivery removed as a variable -- an upper bound, not a prediction. set -e cd "$(dirname "$0")/../.." RINGS=${1:?ring KB list, quoted} RATES=${2:?pipe KB/s list, quoted, 0 = unlimited} printf "%6s %9s %9s %9s %8s %9s %s\n" ring kbps ceiling build_s mean underruns bound for R in $RINGS; do for K in $RATES; do L=tmp/pace_r${R}_k${K}.log bash tools/bench/pace_run.sh "$R" "$K" > /dev/null 2>&1 || { \ printf "%6s %9s FAILED (see %s)\n" "$R" "$K" "$L"; continue; } python3 - "$L" "$R" "$K" <<'PY' import re, sys log, ring, kbps = sys.argv[1], sys.argv[2], sys.argv[3] t = open(log, errors="replace").read() def g(p, d="?"): m = re.search(p, t) return m.group(1) if m else d ceil_ = g(r"SEEK SLACK: ceiling (\d+) frames") build = g(r"BUILD TIME: (\d+) ticks") mean = g(r"mean ([\d.]+) over the window") under = g(r"UNDERRUNS: (\d+)/") bound = "ring" if "RING-BOUND" in t else ("rate" if "RATE-BOUND" in t else "?") fps = 12.0 print("%6s %9s %9s %9.2f %8s %9s %s" % ( ring, kbps, ceil_, (int(build)/fps if build.isdigit() else -1), mean, under, bound)) PY done; done