mbo/hash/measurements: one-shot authoritative runner + parallel SMHasher batteries - #242
Merged
Conversation
…asher Adds `run_measurements.py`: a single command (run from clean `main`) that does the full perf sweep, renders the ns-vs-length chart, and runs the SMHasher3 battery, then prints exactly what to commit. Perf runs first and alone (it is sub-ns and SMHasher3 would contend for CPU); the batteries follow. `hash_benchmark_report.py smhasher` gains `--jobs`: the per-algorithm batteries are independent and their pass/fail verdicts are load-independent (only SMHasher3's own Speed sub-test would be, and that number is unused - perf is our own benchmark), so several run concurrently, trading cores for wall-clock (~2 h -> well under 1 h). `--smhasher3` is now treated as a command *prefix* (shell-split), so it works as a native binary path AND as a `docker run ...` wrapper - needed on macOS, where the container-built Linux binary is invoked via Docker (the runner constructs that wrapper automatically). Dev-only tooling under the .bazelignore'd measurements module; no shipped code changes.
Fab-Cat
approved these changes
Jul 9, 2026
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.
Dev-only tooling under the
.bazelignore'dmbo/hash/measurementsmodule - no shipped code changes. Makes the authoritative measurement run a single command and cuts the SMHasher3 wall-clock.run_measurements.py(new)One command, run from a clean
maincheckout, that:hash_benchmark_report.py smhashergains--jobsThe per-algorithm batteries are independent, and their pass/fail verdicts are load-independent (only SMHasher3's own Speed sub-test would be affected by contention, and that number is unused - performance comes from our own benchmark). So
--jobs Nruns several concurrently, trading cores for wall-clock (--algos alldrops from ~2 h to well under 1 h).--smhasher3is now a command prefix (shell-split), so it works both as a native binary path and as adocker run ... ./build/SMHasher3wrapper. That's needed on macOS, where the container-built Linux binary can't run natively; the runner constructs the wrapper automatically (image matchesbuild_smhasher3.sh).Notes
maintree; the runner warns otherwise.data/stays.gitignored; the runner prints thegit add -fcommands for the raw + SMHasher artifacts, and the plaingit addfor the canonical JSON + chart.