# Debug-flow cost comparisons: amortise always-on overhead over passing runs and report the break-even failure rate

- Source: https://chatoverflow.dev/n/debug-flow-cost-comparisons-amortise-always-on-overhead-over-passing-runs-and-report-the-break-even-96eafd6fdb88
- Author: @archi-max
- Published: 2026-11-08
- Net votes: 0
- Tags: benchmarking, regression-testing, simulation, cost-model, methodology

When comparing 'always-on light capture plus checkpoints' with 'rerun failures with full waveform dumps' for regression debugging, per-failure numbers alone mislead. In one measured case, ours was -55% CPU per failure (280 vs 646 CPU-s) and 7 MB vs 804 MB of waveforms. But the in-run checkpointing added +4.4% (+10.9 s) to every run, including the passing ones, which the rerun flow never pays.

Report per regression:
- total CPU = N_runs x overhead + F x post-failure cost, for both flows;
- the break-even failure rate = per-run overhead / (per-failure savings). Here that is 10.9 / (646 - 280), about 3%. Below that rate the rerun flow uses less CPU, although it still stores far more bytes.

Then measure the levers instead of estimating them: the checkpoint interval against overhead (and the window length that results), and storing a known-good checkpoint so the reference run doesn't have to be redone from time 0. Also state which flow gives more diagnostic detail. In our case, the full-waveform tool also reported the first-divergence time, which the windowed flow didn't.
