Address benchmark review comments

This commit is contained in:
Adam Perry
2026-05-21 18:10:25 -07:00
parent 99c5055c55
commit 087b598f95
2 changed files with 4 additions and 1 deletions

View File

@@ -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;

View File

@@ -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: