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

The shelf's stretches show in Server-Timing on /, /apps and a person's page #6256

Parked opened this
Closed without merging

/apps and /:owner now send the shelf's laps in Server-Timing. / does not, because it never runs shelfRows. bun test passes for the new test and the 10 related files I ran; bun x tsc --noEmit could not run here (missing bun type definitions), and design-lint is clean.

Notes

stopped parked by the crew deploy c464e89

opened this

/apps and /:owner now send the shelf's laps in Server-Timing. / does not, because it never runs shelfRows. bun test passes for the new test and the 10 related files I ran; bun x tsc --noEmit could not run here (missing bun type definitions), and design-lint is clean.

  • Laps were already reaching the header. shelfRows already called notePhase. They showed as bare records, runs, production, pulls and rows, which are easy to confuse with other phases. I prefixed them as shelf-records, shelf-runs, shelf-production, shelf-pulls and shelf-rows (shelf-rows is the per-row stretch). I used a hyphen because notePhase rejects dots in a phase name, so shelf.runs as the issue suggested would throw.
  • Repeated name fixed. /:owner sent owner twice in one header. The second, the org access lookup in src/web/pages/org.ts, is now access.
  • / is a different shelf. It draws the cached front page. Its one shelf phase covered both reading the page and drawing the tiles. It now sends shelf for the read and tiles for the drawing. Splitting frontPage's own work, such as ranking and looks, would need a request threaded into src/actions/front.ts, so I left that out.
  • Not changed: /apps still sends its outer shelf phase as the sum, alongside the new laps.
  • Test: test/shelf-laps.test.ts requests /apps and /keeper with two apps and asserts each lap name appears once. It also checks that / sends shelf and tiles once each. No existing test was changed.

To try it, run curl -sI <preview>/apps | grep -i server-timing.

Closes #6178

2 earlier comments
commented

/apps and /:owner now send the shelf's laps in Server-Timing. / does not, because it never runs shelfRows. bun test passes for the new test and the 10 related files I ran; bun x tsc --noEmit could not run here (missing bun type definitions), and design-lint is clean.

  • Laps were already reaching the header. shelfRows already called notePhase. They showed as bare records, runs, production, pulls and rows, which are easy to confuse with other phases. I prefixed them as shelf-records, shelf-runs, shelf-production, shelf-pulls and shelf-rows (shelf-rows is the per-row stretch). I used a hyphen because notePhase rejects dots in a phase name, so shelf.runs as the issue suggested would throw.
  • Repeated name fixed. /:owner sent owner twice in one header. The second, the org access lookup in src/web/pages/org.ts, is now access.
  • / is a different shelf. It draws the cached front page. Its one shelf phase covered both reading the page and drawing the tiles. It now sends shelf for the read and tiles for the drawing. Splitting frontPage's own work, such as ranking and looks, would need a request threaded into src/actions/front.ts, so I left that out.
  • Not changed: /apps still sends its outer shelf phase as the sum, alongside the new laps.
  • Test: test/shelf-laps.test.ts requests /apps and /keeper with two apps and asserts each lap name appears once. It also checks that / sends shelf and tiles once each. No existing test was changed.

To try it, run curl -sI <preview>/apps | grep -i server-timing.

commented

/apps and /:owner now send the shelf's laps in Server-Timing. / does not, because it never runs shelfRows; its front-page shelf now reports shelf and tiles. The earlier red check was a test I should have updated. I ran only the two test files, not the whole check, and the pushed change has not been re-checked by the forge. The type check did not run here (no bun types in the sandbox).

  • Laps: shelfRows already recorded its stretches, but under bare names that were easy to confuse with other phases. They are now shelf-records, shelf-runs, shelf-production, shelf-pulls and shelf-rows, the last being the per-row stretch. I used hyphens because notePhase rejects dots, so shelf.runs would throw.
  • Repeated name: /:owner sent owner twice in one header. The org access lookup in src/web/pages/org.ts is now access.
  • / signed out: its shelf is the cached front page, so I split the one shelf phase into shelf for reading the page and tiles for drawing them. Breaking down frontPage's own work would need a request threaded into src/actions/front.ts, which I left out.
  • Check fix: the failing "GET / signed out names session, shelf, render in order…" test pinned the exact phase list. It was wrong for this change, so I updated it to expect tiles between shelf and render.
  • Test: test/shelf-laps.test.ts requests /apps, /keeper and / with two apps and asserts each lap name appears once.

To try it, run curl -sI <preview>/apps | grep -i server-timing.

commented

Parked by the crew: the check failed ("40 apps are drawn within budget, in the phases Server-Timing names") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs