mirror of
https://github.com/openai/codex.git
synced 2026-05-23 12:34:25 +00:00
Address benchmark review comments
This commit is contained in:
@@ -112,6 +112,7 @@ fn cache_miss_variants(image: Vec<u8>) -> Vec<Vec<u8>> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Encodes a synthetic UI screenshot fixture for prompt image benchmarks.
|
||||
fn screenshot_png(size: ImageSize) -> Vec<u8> {
|
||||
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<u8> {
|
||||
encode_fixture(DynamicImage::ImageRgba8(image), ImageFormat::Png)
|
||||
}
|
||||
|
||||
/// Encodes a synthetic textured photo fixture for prompt image benchmarks.
|
||||
fn photo_jpeg(size: ImageSize) -> Vec<u8> {
|
||||
let image = RgbImage::from_fn(size.width, size.height, |x, y| {
|
||||
let x_gradient = x * 255 / size.width;
|
||||
|
||||
3
justfile
3
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:
|
||||
|
||||
Reference in New Issue
Block a user