pub struct FailedCommits { /* private fields */ }Expand description
Commits that failed in an earlier run, with how and under what.
Without a memory of these, a commit that can never be recorded is chosen
again at the top of every run, and with --limit a backfill stops making
progress at the first one. That holds for a failed measurement as much as
for a failed build: at a fixed commit, a benchmark that errors or a
fixture that is missing fails the same way every time. A flaky one costs
a point --force can recover, where not remembering it cost every older
commit behind it.
A build failure is per commit, and keyed on the runner class and
[build], so changing the build — usually to fix exactly that failure —
or moving to a new toolchain tries the commit again. A measurement failure
is per benchmark, so a run of other benchmarks (--bench B after --bench A failed) still measures them, and it is keyed on those and on the
contents of tak.toml as well, since editing a benchmark is how one of
those gets fixed. Not on --runs: a benchmark that errors at five runs
errors at ten, and one that only fails sometimes is what --force is for.
Kept in git’s common directory: shared by the repository’s worktrees,
never committed, and local to this clone, since a failure says as much
about this machine as about the commit.
One line per failure: SHA \t build-failed \t KEY, or SHA \t measure-failed \t BENCH \t KEY with the benchmark’s name as a JSON
string, which cannot hold a tab. A line written before reasons were
recorded, SHA \t KEY, is a build failure.
Implementations§
Source§impl FailedCommits
impl FailedCommits
Sourcepub fn load(build_key: String, measure_key: String) -> Result<FailedCommits>
pub fn load(build_key: String, measure_key: String) -> Result<FailedCommits>
The commits that failed under these keys: build_key describes the
runner class and [build], measure_key those and the benchmarks.
Sourcepub fn build_failed(&self, sha: &str) -> bool
pub fn build_failed(&self, sha: &str) -> bool
Whether sha’s build failed before under these keys.
Sourcepub fn measure_failed(&self, sha: &str, bench: &str) -> bool
pub fn measure_failed(&self, sha: &str, bench: &str) -> bool
Whether measuring bench at sha failed before under these keys.