#!/bin/sh # Runs iris's on-demand benchmark suite (IRIS_TODO.md's "Benchmarks" item). # Never run by `cargo test`; run this by hand or before/after a layout # change. Always release -- see AGENTS.md's own rule against reading a # frame time from a debug build. # # ./run-bench.sh # everything # ./run-bench.sh list # just the CPU-only message-list scenarios # ./run-bench.sh images # just the GPU bind-group-creation scenario set -eu here=$(cd "$(dirname "$0")" && pwd) cd "$here" what="${1:-all}" if [ "$what" = "all" ] || [ "$what" = "list" ]; then echo "=== message_list (CPU-only, no window) ===" cargo bench --bench message_list fi if [ "$what" = "all" ] || [ "$what" = "images" ]; then echo "=== bench_images (real wgpu device, via run-headless.sh) ===" timeout 60 ./run-headless.sh bench_images --seconds 4 2>&1 | grep "^BENCH_IMAGES" fi