Skip to content

Add a command that diffs two retained captures of the same suite - #4

Open
mvanhorn wants to merge 1 commit into
Proa-Labs:mainfrom
mvanhorn:feat/capture-delta
Open

mvanhorn wants to merge 1 commit into
Proa-Labs:mainfrom
mvanhorn:feat/capture-delta

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Add compare/ so two retained JSON captures from the same suite can be placed next to each other. Headline cells (render P50 and payload bytes, HTTP capacity, cold-start first response) print as Markdown or JSON. Captures from different suites are rejected, and a cell that exists on only one side is listed as added or removed rather than filled in.

Why

The published numbers are dated records from one machine. This repository already keeps more than one canonical archive, and a later recapture is supposed to be checked against the current page before it replaces it. Until now that check meant reading two tables by eye. The protocol also forbids joining values across suites; this command enforces that by refusing a mixed pair.

How to try it

node --test compare/compare.test.mjs
node compare/run.mjs \
  rendering/results/archive/canonical-ssr-v1-2026-09-05-9363fc29b790.json \
  rendering/results/latest.json

--json writes the structured comparison. --suite canonical (or product-scaling, page-load, cold-start) fails if the files are a different suite.

Notes

  • Quality CI runs node --test compare/compare.test.mjs.
  • Root README and BENCHMARK_PROTOCOL.md point at compare/.
  • Measured-source fingerprints are unchanged: no edits under package.json or the HTTP/renderer source lists.

Demo

demo

Diff two canonical, product-scaling, page-load, or cold-start captures
and print headline metric changes without mixing suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant