Commit a90ae6b
committed
test(bench): add Blake3Service hash-throughput criterion benchmark
Adds bench_blake3 benchmark group over 3 input sizes (1 KiB / 64 KiB
/ 1 MiB) x 2 hash modes (quick_hash + full_hash) with Throughput::Bytes
annotation so criterion reports MiB/s alongside per-iter time.
iter_batched + BatchSize::SmallInput keeps the per-iteration tempfile
write out of the measurement window — only the hash call is timed.
sample_size = 30 (criterion default = 100; reduced for CI wall-clock
budget per spec D-6). Override at invocation: `cargo bench -- --sample-size N`.
WHY #![allow(missing_docs)] at the top of the bench file: the workspace
lint set denies missing_docs, but `criterion_group!` macro expansion
produces an undocumented `pub fn benches()`. Bench targets are not
part of the library's public surface (compiled only with --benches),
and the macro entry point is third-party.
Local 10-sample smoke run completed all 6 benchmarks: 1KiB quick/full
~13 MiB/s, 64KiB ~520 MiB/s, 1MiB ~1.27 GiB/s on this VM (cold-cache
dev environment numbers — CI runner numbers will differ; baseline
calibration is the follow-up GH issue per spec §10 Q5).
Cargo.lock updated with criterion 0.5 transitive deps (anes, cast,
ciborium, plotters, etc.) — first build that resolved them.1 parent 68c12bd commit a90ae6b
2 files changed
Lines changed: 236 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
0 commit comments