Expand description
Which compiled benchmark executables a measurement pass ran.
The nightly criterion lane measures a reference and a candidate revision on the same host. Cargo decides freshness per target directory, so when both revisions share one, a candidate that differs only in source can be judged fresh and the reference’s binary runs again under the candidate’s name. The lane therefore builds each revision into its own target directory before it measures either, and this module keeps the evidence:
manifest_from_cargo_messagesrecords each bench executable thatcargo bench --no-run --message-format=jsonbuilt, by canonical path and SHA-256, in anExecutableManifestfor one commit.verify_passreads theRunninglines Cargo printed during one pass, and accepts the pass only when every executable it ran is in the manifest and still has the recorded digest.compare_summariesrefuses a comparison whose reference and candidate share an executable path, or whose passes on one side ran different executables.
Structs§
- Bench
Executable - One compiled benchmark executable.
- Executable
Manifest - The bench executables that one revision was built into.
Functions§
- file_
digest - The SHA-256 of the file at
path, in lowercase hex. - manifest_
from_ cargo_ messages - Record the bench executables in Cargo’s
--message-format=jsonoutput. - ran_
executables - The executables Cargo reports running in
cargo_log, resolved againstsource_dir. - verify_
pass - Check that one measurement pass ran only the manifest’s executables, unchanged, and return the executables it ran.