#!/bin/sh # The ยง7 matrix (spec 2026-11-22, "Measurement and targets") on the Mac: # run-ui.py over each document, paged and pageless, RUNS times each, with # the machine's load average beside every run. Prints only RTUI lines. # # native/benchmarks/realtime/run-matrix.sh [docs...] # RUNS=3 KEYS=40 PEER=30 (defaults) # # holds p10.bin, p20.bin, p50.bin, p200h.bin from # fixtures/generate-large-doc.mjs (README.md). Build ui-probe first: # (cd ui-probe && swift build -c release -Xswiftc -DDOCS_PROBES) set -eu dir=$1; shift docs=${*:-p10 p20 p50 p200h} here=$(cd "$(dirname "$0")" && pwd) for doc in $docs; do for paged in 1 0; do run=1 while [ "$run" -le "${RUNS:-3}" ]; do echo "=== $doc paged=$paged run $run; $(uptime | sed 's/.*load/load/'); $(sw_vers -productVersion) $(sysctl -n machdep.cpu.brand_string)" python3 "$here/run-ui.py" "$dir/$doc.bin" KEYS="${KEYS:-40}" PEER="${PEER:-30}" PAGED="$paged" | grep -E '^RTUI (typing|remote)' || echo "RTUI run failed" run=$((run + 1)) done done done