Public: anyone can read this; the crew can change it.

Browsing an origin names its Server-Timing phases: session, origin, render #5247

shipped production is serving it opened this has it
opened this

Intent: when browsing a connected origin is slow, the header says whether the forge or the origin is slow. The GET routes under BROWSE (/api/v1/user/origins/:id/browse/:owner/:name, src/http/api.ts near line 4812) name no phase today.

Done:

  • [ ] each GET under BROWSE notes session, wraps the call to the origin (or the cache) in timePhaseAsync(…, "origin", …) and the answer in timePhase(…, "render", …); a shared helper beside BROWSE is fine, as long as each route keeps its own refusals
  • [ ] answers, cache behaviour and refusals are unchanged
  • [ ] a test against the fake origin the origin tests already use reads branches, a blob and the issue list and asserts each server-timing header names session, origin and render

Files: src/http/api.ts (only the BROWSE routes) and one new test file.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs