fix(bench): repair three dead fixture references#69
Merged
Conversation
`cargo bench` panicked before running anything. Criterion constructs every benchmark group before executing any of them, so one missing fixture took down the whole run -- including groups that need no files at all. Three references were dead, not one: - real_images referenced katzi.png, which exists nowhere in the repo - real_images referenced marienplatz.png as if it were in images/, but it only exists under images/benchmark_only/ - bench_full_res referenced benchmark_only/test7.jpeg, which does not exist, so that group had been dead too Replaces the two real_images entries with cat.png and olympiapark.png, which exist and are 800x480 like every other file in images/ -- keeping the group's hardcoded 800x480 throughput honest. Points bench_full_res at benchmark_only/marienplatz.png (1280x960) and corrects its doc comment, which claimed 6240x4160. Also replaces load_fixture with try_load_fixture, which warns and skips instead of panicking, so future fixture drift degrades one group rather than the run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo benchpanicked before running a single benchmark. Found while benchmarking dizzy dithering in #68; pre-existing onmain.Criterion constructs every benchmark group before executing any of them, so a single missing fixture takes down the whole run — including the synthetic groups that need no files at all.
Three dead references, not one
katzi.pngmarienplatz.pngimages/benchmark_only/marienplatz.pngbenchmark_only/test7.jpegbench_full_reswas dead tooThe third one means
full_reshas been non-functional for as long as the fixture was missing, which nobody noticed because the run died earlier anyway.Fix
real_imagesnow usescat.pngandolympiapark.png. Both exist, and both are 800×480 like every other file inimages/— which keeps that group's hardcodedThroughput::Elements(800 * 480)honest. I added a comment saying so, because picking a differently-sized fixture there would silently produce wrong throughput numbers rather than an error.bench_full_respoints atbenchmark_only/marienplatz.png(1280×960). Its doc comment claimed 6240×4160, which was wrong for any file present; corrected.load_fixturebecomestry_load_fixture, warning and skipping instead of panicking. That is the root-cause fix: fixture drift should cost you one group, not the entire benchmark suite.Verification
cargo bench --bench dithering -- --testnow constructs and runs every group:cargo test --workspace(76 unit + 5 regression suites, 40 fixture comparisons) andcargo clippy --workspace -- -D warningsboth clean. No library code touched.