Download codex-rs/cli/e2e_benches/codex_help.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 806 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/cli/e2e_benches/codex_help.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/cli/e2e_benches/codex_help.rs
-
curl -L -o codex_help.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/cli/e2e_benches/codex_help.rs
806 Bytes
| use std::process::Command; | |
| use divan::Bencher; | |
| fn main() { | |
| divan::main(); | |
| } | |
| /// Exercises the Bazel-backed end-to-end benchmark path with a cheap, | |
| /// deterministic Codex invocation. Richer scenarios can add separate | |
| /// benchmark binaries without making the shared harness depend on them. | |
| fn codex_help(bencher: Bencher) { | |
| let codex = codex_utils_cargo_bin::cargo_bin("codex") | |
| .expect("codex binary should be available through Bazel runfiles"); | |
| bencher.bench_local(move || { | |
| let output = Command::new(&codex) | |
| .arg("--help") | |
| .output() | |
| .expect("codex --help should run"); | |
| assert!(output.status.success(), "codex --help should succeed"); | |
| }); | |
| } | |