You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9ea73f5
Browse filesBrowse the repository at this point in the historyBrowse files
test(web): perf.mjs lists error responses apart from the timings
A non-2xx/3xx Node response leaves the URL out of the stats; a live one leaves
it without a live time. Live statuses are cached with the times.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It prints, per format and overall, the p50 and p95 across URLs of each URL's median on Node and live, and the ratio of the Node p50 to the live p50 over URLs timed on both. A URL is flagged when its Node median is more than 1.5 times live's and more than 300 ms slower. Live requests are spaced at least 250 ms apart and capped by `--max-live` (warm-ups count); URLs past the cap get Node times only. Live times are cached with a timestamp in `.cache/perf-live.json`, so later runs reuse them until `--refresh-live`.
53
+
It prints, per format and overall, the p50 and p95 across URLs of each URL's median on Node and live, and the ratio of the Node p50 to the live p50 over URLs timed on both. A URL is flagged when its Node median is more than 1.5 times live's and more than 300 ms slower. Responses other than 2xx/3xx are listed apart: a Node error leaves the URL out of the stats, a live one leaves it without a live time. Live requests are spaced at least 250 ms apart and capped by `--max-live` (warm-ups count); URLs past the cap get Node times only. Live times are cached with a timestamp in `.cache/perf-live.json`, so later runs reuse them until `--refresh-live`.
54
54
55
55
Against a local app and database the comparison is indicative only: live times include the network round trip from your machine, Node times do not, and a laptop with a local copy of the database is not the production host. Time on staging for numbers that decide anything.
console.log(`${runs} runs per URL, median per URL; p50/p95 across URLs, in ms. Ratio = Node p50 / live p50 over URLs timed on both.`);
96
+
console.log(`${runs} runs per URL, median per URL; p50/p95 across URLs, in ms. Ratio = Node p50 / live p50 over URLs timed on both. Error responses are listed apart.`);
96
97
console.log('format urls node p50 node p95 live p50 live p95 ratio flagged');
0 commit comments