Files
codex/scripts/smoke-test-rust-benches.sh
Adam Perry 4792e463c4 Add image re-encoding benchmarks.
This is one of the more compute-heavy workflows that the
app server performs, we should be able measure how fast it is
against past revisions.

Add a step to the general CI job which will run each benchmark
as a test without trying to actually measure many iterations.
2026-05-21 14:38:43 -07:00

17 lines
468 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/../codex-rs"
bench_targets="$(
cargo metadata --no-deps --format-version 1 \
| jq -r '.packages[] as $package | $package.targets[] | select(any(.kind[]; . == "bench")) | [$package.name, .name] | @tsv'
)"
if [[ -n "$bench_targets" ]]; then
while IFS=$'\t' read -r package bench_target; do
cargo bench -p "$package" --bench "$bench_target" -- --test
done <<< "$bench_targets"
fi