#!/bin/sh # RUST.md's I5 "Where iris's frame time goes" pass (2026-09-05). The same # 24-swipe/6-cycle loop as transcript-bench.sh's, extracted for iris's own # demo app -- transcript-bench.sh itself is Compose-specific (opens by # session title through the Compose app's own UI) and cannot be called # directly against dev.iris.android.demo. # # MUST be run from inside this checkout (not /tmp): ui-trace/adb pick which # emulator to target from the current directory's basename (the # per-checkout-AVD rule), and a previous pass lost two attempts to a `cd` # into /tmp that made this resolve to a nonexistent "tmp" checkout. set -eu cd "$(dirname "$0")" . ./android-env.sh >/dev/null 2>&1 cycles=${1:-6} ui-trace record -d 3000 --do "tap 'Reset frame report'" -o /tmp/iris-bench-reset.txt >/dev/null adb logcat -c DO="" i=0 while [ "$i" -lt "$cycles" ]; do DO="$DO --do 'swipe 540 700 540 1600 200' --do 'wait 500'" DO="$DO --do 'swipe 540 700 540 1600 200' --do 'wait 500'" DO="$DO --do 'swipe 540 1600 540 700 200' --do 'wait 500'" DO="$DO --do 'swipe 540 1600 540 700 200' --do 'wait 500'" i=$((i + 1)) done eval ui-trace record -d $((cycles * 16000 + 20000)) $DO -o /tmp/iris-bench-scroll.txt >/dev/null ui-trace record -d 3000 --do "tap 'Frame report'" -o /tmp/iris-bench-report.txt >/dev/null sleep 1 adb logcat -d -s iris-android-app:I | grep "iris frame report:"