Download this file
| 1 | #!/bin/sh |
| 2 | # The §7 matrix (spec 2026-11-22, "Measurement and targets") on the Mac: |
| 3 | # run-ui.py over each document, paged and pageless, RUNS times each, with |
| 4 | # the machine's load average beside every run. Prints only RTUI lines. |
| 5 | # |
| 6 | # native/benchmarks/realtime/run-matrix.sh <docs dir> [docs...] |
| 7 | # RUNS=3 KEYS=40 PEER=30 (defaults) |
| 8 | # |
| 9 | # <docs dir> holds p10.bin, p20.bin, p50.bin, p200h.bin from |
| 10 | # fixtures/generate-large-doc.mjs (README.md). Build ui-probe first: |
| 11 | # (cd ui-probe && swift build -c release -Xswiftc -DDOCS_PROBES) |
| 12 | set -eu |
| 13 | dir=$1; shift |
| 14 | docs=${*:-p10 p20 p50 p200h} |
| 15 | here=$(cd "$(dirname "$0")" && pwd) |
| 16 | for doc in $docs; do |
| 17 | for paged in 1 0; do |
| 18 | run=1 |
| 19 | while [ "$run" -le "${RUNS:-3}" ]; do |
| 20 | echo "=== $doc paged=$paged run $run; $(uptime | sed 's/.*load/load/'); $(sw_vers -productVersion) $(sysctl -n machdep.cpu.brand_string)" |
| 21 | 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" |
| 22 | run=$((run + 1)) |
| 23 | done |
| 24 | done |
| 25 | done |
| 26 | |