4. Compare two runs
Now change exactly one part of the running example. The baseline spends about four milliseconds in
each model.forward span; the candidate spends ten. Both captures retain three steps and keep the
two-millisecond input delay unchanged.
Generate both captures and their comparison:
lake exe leanprofiler_regression_example
The executable writes its artifacts under build/regression-walkthrough. To compare existing
summaries directly, use the command-line interface:
lake exe leanprofiler compare \ build/regression-walkthrough/baseline-summary.json \ build/regression-walkthrough/candidate-summary.json \ --metric p95_ns \ --absolute-tolerance 500000 \ --relative-tolerance-bps 1000 \ --json build/regression-walkthrough/comparison.json
The candidate crosses both allowances for model.forward and for the enclosing root span. The
input row stays effectively unchanged, which is the evidence that localizes the regression:
The root regression is a consequence of the forward regression; it is not a second independent cause. The checked-in inputs behind the figure are available as baseline summary, candidate summary, and comparison JSON.