Skip to main content

Module executables

Module executables 

Source
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_messages records each bench executable that cargo bench --no-run --message-format=json built, by canonical path and SHA-256, in an ExecutableManifest for one commit.
  • verify_pass reads the Running lines 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_summaries refuses a comparison whose reference and candidate share an executable path, or whose passes on one side ran different executables.

Structs§

BenchExecutable
One compiled benchmark executable.
ExecutableManifest
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=json output.
ran_executables
The executables Cargo reports running in cargo_log, resolved against source_dir.
verify_pass
Check that one measurement pass ran only the manifest’s executables, unchanged, and return the executables it ran.