Skip to main content

Module baseline

Module baseline 

Source
Expand description

Named local baselines, for the edit-measure loop.

tak compare needs both sides recorded against commits. Someone optimising a hot path wants to measure, edit, and measure again, and the edited working tree has no commit to hang a note on. Recording against HEAD anyway would attach a measurement to a commit whose code it does not describe, and that note would travel with the next tak push. So a baseline is a named file of records instead, compared with the same crate::compare the gate uses.

Files live under the git common directory, <git-common-dir>/tak/baselines:

  • never committed and never pushed, since nothing under .git is;
  • outside the working tree, so no .gitignore entry is needed and a git clean -fdx between edits does not delete the baseline;
  • shared by every worktree of a clone, so a baseline saved on one branch’s worktree can be compared from another’s.

One Record::to_line per line, the same bytes a note would hold, so a baseline is read by the same parser and skips the same unreadable lines.

Structs§

Baseline
A saved baseline, loaded.
Store
The directory baselines are kept in.

Enums§

Gap
Why a series this run measured cannot be gated against the baseline.

Functions§

gaps
The series this run measured that --gate cannot check, and why.
other_runners
Runner classes other than k’s that the baseline holds k’s benchmark and tool on, sorted.
relevant
The part of a baseline this run is compared against: the series this run measured, on this run’s runner class.
validate_name
Reject a name that is not a plain file name.