26 lines
924 B
Bash
Executable File
26 lines
924 B
Bash
Executable File
#!/bin/sh
|
|
# Runs iris's on-demand benchmark suite.
|
|
# 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.
|
|
#
|
|
# ./scripts/run-bench.sh # everything
|
|
# ./scripts/run-bench.sh list # just the CPU-only message-list scenarios
|
|
# ./scripts/run-bench.sh images # just the GPU bind-group-creation scenario
|
|
set -eu
|
|
scripts=$(cd "$(dirname "$0")" && pwd)
|
|
root=$(cd "$scripts/.." && pwd)
|
|
cd "$root"
|
|
|
|
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 "$scripts/run-headless.sh" bench_images --seconds 4 2>&1 | grep "^BENCH_IMAGES"
|
|
fi
|