mirror of
https://github.com/openai/codex.git
synced 2026-05-29 23:40:29 +00:00
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.
17 lines
468 B
Bash
Executable File
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
|