mirror of
https://github.com/openai/codex.git
synced 2026-05-23 20:44:50 +00:00
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.
This commit is contained in:
16
scripts/smoke-test-rust-benches.sh
Executable file
16
scripts/smoke-test-rust-benches.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user