mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Add app-server startup benchmark crate (#24651)
## Summary - Add a new `app-server-start-bench` crate to measure app-server startup performance - Wire the benchmark into the workspace and Bazel build so it can be run consistently - Update lockfiles and repo automation to account for the new package
This commit is contained in:
committed by
GitHub
parent
a4ed6c5aa0
commit
bd2a732923
22
justfile
22
justfile
@@ -2,6 +2,9 @@ set working-directory := "codex-rs"
|
||||
set positional-arguments
|
||||
|
||||
rust_min_stack := "8388608" # 8 MiB
|
||||
e2e_benchmark_packages := "codex-app-server-start-bench"
|
||||
e2e_codex_bin := if os() == "windows" { "./target/release/codex.exe" } else { "./target/release/codex" }
|
||||
e2e_smoke_codex_bin := if os() == "windows" { "./target/debug/codex.exe" } else { "./target/debug/codex" }
|
||||
|
||||
# Display help
|
||||
help:
|
||||
@@ -30,6 +33,11 @@ app-server-test-client *args:
|
||||
cargo build -p codex-cli
|
||||
cargo run -p codex-app-server-test-client -- --codex-bin ./target/debug/codex "$@"
|
||||
|
||||
# Run end-to-end performance benchmarks that require a built Codex binary.
|
||||
bench-e2e *args:
|
||||
cargo build --release -p codex-cli --bin codex
|
||||
for package in {{ e2e_benchmark_packages }}; do CODEX_BIN="{{ e2e_codex_bin }}" cargo run --release -p "$package" -- --bench "$@"; done
|
||||
|
||||
# Format Rust and Python SDK code.
|
||||
fmt:
|
||||
cargo fmt -- --config imports_granularity=Item 2>/dev/null
|
||||
@@ -55,13 +63,19 @@ test *args:
|
||||
RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast "$@"
|
||||
just bench-smoke
|
||||
|
||||
# Run explicit workspace benchmark targets.
|
||||
bench *args:
|
||||
# Run unit-test-style benchmark targets managed entirely by Cargo.
|
||||
bench-unit *args:
|
||||
cargo bench --workspace --bench '*' "$@"
|
||||
|
||||
# Run benchmark targets once to ensure they start successfully.
|
||||
# Smoke Cargo-managed benchmarks and compile e2e runners without measured binaries.
|
||||
bench-smoke:
|
||||
just bench -- --test
|
||||
just bench-unit -- --test
|
||||
for package in {{ e2e_benchmark_packages }}; do cargo build -p "$package" --bin "$package"; done
|
||||
|
||||
# Run end-to-end performance benchmark targets once.
|
||||
bench-e2e-smoke:
|
||||
cargo build -p codex-cli --bin codex
|
||||
for package in {{ e2e_benchmark_packages }}; do CODEX_BIN="{{ e2e_smoke_codex_bin }}" cargo run -p "$package" -- --test; done
|
||||
|
||||
# Build and run Codex from source using Bazel.
|
||||
# Note we have to use the combination of `[no-cd]` and `--run_under="cd $PWD &&"`
|
||||
|
||||
Reference in New Issue
Block a user