Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e63a366dddf7d04189d49789aab5e72be0490c3a
parent 9f953ab7635a9924c81cbffdcb706bf6b8513267
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 25 Sep 2026 00:32:18 -0400

editor: measure-nav times the /api/view paths, not the six retired ones

The script still requested /api/pulse, /api/widget/{cleanable,
actionable,sync}, /api/jobs/active and /api/workers — retired in Phase 3,
answered only through next.config.ts's rewrites, so its numbers measured
rewrite + view (a Phase 3 deferred item). It now requests the
/api/view/<name> paths the pages poll, idle-pulse check included. Run
once against the live :3001 (GETs only): every route and endpoint 2xx.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/scripts/measure-nav.mjs | 29+++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/editor/scripts/measure-nav.mjs b/editor/scripts/measure-nav.mjs @@ -60,13 +60,18 @@ const ROUTES = [ ["/changelog", "changelog"], ]; +// The polled endpoints, by the /api/view/<name> paths the pages actually call +// (editor/app/api/view/[name]). The six pre-phase-3 paths (/api/pulse, +// /api/widget/{cleanable,actionable,sync}, /api/jobs/active, /api/workers) are +// retired — they answer only through editor/next.config.ts's rewrites, so +// timing them measured rewrite + view, a hop no page pays. const APIS = [ - "/api/pulse", - "/api/widget/cleanable", - "/api/widget/actionable", - "/api/widget/sync", - "/api/jobs/active", - "/api/workers", + "/api/view/pulse", + "/api/view/cleanable", + "/api/view/widgetActionable", + "/api/view/widgetSync", + "/api/view/activeJobs", + "/api/view/workers", ]; // The 4-element form. A 5th element is a 500; `true` in slot 4 means "refetch", @@ -161,12 +166,12 @@ for (const [route, segment] of ROUTES) { ); } -console.log("\n" + "endpoint".padEnd(28) + "ms".padStart(8) + " size"); +console.log("\n" + "endpoint".padEnd(30) + "ms".padStart(8) + " size"); console.log("-".repeat(56)); for (const api of APIS) { const r = await best(() => timeGet(`${BASE}${api}`)); console.log( - api.padEnd(28) + + api.padEnd(30) + fmt(r.ms) + " " + kb(r.bytes) + @@ -176,16 +181,16 @@ for (const api of APIS) { // The idle pulse is the one that has to stay cheap forever — measure it the way // the client actually calls it, with a rev in hand. -const first = await timeGet(`${BASE}/api/pulse`); +const first = await timeGet(`${BASE}/api/view/pulse`); if (first.status === 200) { - const res = await fetch(`${BASE}/api/pulse`); + const res = await fetch(`${BASE}/api/view/pulse`); const body = await res.json(); const idle = await best(() => - timeGet(`${BASE}/api/pulse?rev=${encodeURIComponent(body.rev)}`), + timeGet(`${BASE}/api/view/pulse?rev=${encodeURIComponent(body.rev)}`), ); console.log( "\n" + - "/api/pulse (idle, rev matched)".padEnd(34) + + "/api/view/pulse (idle, rev matched)".padEnd(36) + fmt(idle.ms) + "ms ← this one is polled forever; keep it tiny", );