From 087b598f95e0ba6c69be5fc5ead4e8327e894046 Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Thu, 21 May 2026 18:10:25 -0700 Subject: [PATCH] Address benchmark review comments --- codex-rs/utils/image/benches/prompt_images.rs | 2 ++ justfile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/codex-rs/utils/image/benches/prompt_images.rs b/codex-rs/utils/image/benches/prompt_images.rs index 9e2719fb01..5d2bcb61cb 100644 --- a/codex-rs/utils/image/benches/prompt_images.rs +++ b/codex-rs/utils/image/benches/prompt_images.rs @@ -112,6 +112,7 @@ fn cache_miss_variants(image: Vec) -> Vec> { .collect() } +/// Encodes a synthetic UI screenshot fixture for prompt image benchmarks. fn screenshot_png(size: ImageSize) -> Vec { let image = RgbaImage::from_fn(size.width, size.height, |x, y| { let toolbar = y < 52; @@ -146,6 +147,7 @@ fn screenshot_png(size: ImageSize) -> Vec { encode_fixture(DynamicImage::ImageRgba8(image), ImageFormat::Png) } +/// Encodes a synthetic textured photo fixture for prompt image benchmarks. fn photo_jpeg(size: ImageSize) -> Vec { let image = RgbImage::from_fn(size.width, size.height, |x, y| { let x_gradient = x * 255 / size.width; diff --git a/justfile b/justfile index b3be809f28..92f8c2837b 100644 --- a/justfile +++ b/justfile @@ -52,8 +52,9 @@ install: # Run `cargo install --locked cargo-nextest` if you don't have it installed. # Prefer this for routine local runs. Workspace crate features are banned, so # there should be no need to add `--all-features`. -test: bench-smoke +test: RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast + just bench-smoke # Run explicit workspace benchmark targets. bench *args: