Documentation
¶
Overview ¶
Command reuse-measure reads the reports make preflight printed for the last landings on the default branch and sets their reuse and check time against the baseline, the measure criterion 6 of itd-2611011325421304 asks for (step 3 of spc-2611012047503720).
Usage, from the repository root:
go run ./cmd/reuse-measure [-ref <ref>] [-n 10] [-baseline <log>] <log or directory>...
A landing is a merge on the first-parent line of -ref (the default branch when it is not given), newest first, and its head is the merge's last parent, the commit the preflight checked. A landing's report is a run in a preflight log, a regular file named outright or a .log file directly inside a directory named, that minted a push receipt for that head: only a passing run mints one. One log can hold several runs, so each is judged alone: its figures are the lines its own mint printed straight after its receipt, the reuse counts of both stages and the times, and a run whose mint was refused reports nothing, though it prints its times too. A log over 64 MiB, one that grows past that as it is read included, or a line over 64 KiB, is not read; a full run whose counts do not read is named and counted nowhere.
The baseline is the count iss-2611011343052330 recorded on 2026-11-01, 0 of 133 packages reused, which has no time. -baseline names the log of a timed run that reused nothing (make preflight PREFLIGHT_FRESH=1), and only against it is a time saving stated: the run's time less the median of the landings that ran test stages, for the whole check and for the race stage. A records-only landing counts as a landing and stays out of the reuse shares and both medians, since it ran no test stage either way.
It prints the table and the shares in Markdown, then the saving or every reason none is stated: a landing with no report here, a report that prints no time, and no timed baseline. It exits 0 when it states the saving, 1 when the measure is short of something, and 2 for a usage mistake, a baseline that reused a package or prints no time, or a path or a git history it cannot read.
It is developer tooling, never part of a release.