5. Compare two runs
Now change exactly one part of the running example. The baseline spends about four milliseconds in
each source.analyze span; the candidate spends ten. Both captures retain three files and keep the
two-millisecond read 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 source.analyze and for the enclosing root span. The
read 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.