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

A repository's pulls list's Server-Timing names its phases: session, each read, render #3330

Parked opened this
Closed without merging

A repository's pulls list (/:owner/:name/pulls, also /changes) now sends its phases in Server-Timing. They are session, pulls, words, labels and render, after app, in that order. The new test test/pulls-list-timing.test.ts asserts that exact order and passes.

Notes

stopped parked by the crew deploy 88e2eb2

opened this

A repository's pulls list (/:owner/:name/pulls, also /changes) now sends its phases in Server-Timing. They are session, pulls, words, labels and render, after app, in that order.

The new test test/pulls-list-timing.test.ts asserts that exact order and passes. With the src change stashed it fails. I could not run bun x tsc --noEmit: bun reported a read-only temp directory in this sandbox, so the type check is unverified here.

  • Change: it is in changesList in src/web/studio/lists.ts. It records session with takeSessionTime, as the runs list does. A small lap helper times each read and the render with notePhase.
  • Phase names: the "each read" phase names are my choice.
    • pulls is the list query.
    • words is the per-pull studio word lookups.
    • labels covers the answered-tells lookup and the label reads together, because I did not give the tells lookup its own phase.
  • Not done: I did not time the repo load and facet parsing, which happen before the session phase. I did not touch other pages.

To try it, run curl -sI against /<owner>/<repo>/pulls and read the server-timing header. Or run bun test test/pulls-list-timing.test.ts.

Closes #3323

2 earlier comments · 1 event
commented

A repository's pulls list (/:owner/:name/pulls, also /changes) now sends its phases in Server-Timing. They are session, pulls, words, labels and render, after app, in that order.

The new test test/pulls-list-timing.test.ts asserts that exact order and passes. With the src change stashed it fails. I could not run bun x tsc --noEmit: bun reported a read-only temp directory in this sandbox, so the type check is unverified here.

  • Change: it is in changesList in src/web/studio/lists.ts. It records session with takeSessionTime, as the runs list does. A small lap helper times each read and the render with notePhase.
  • Phase names: the "each read" phase names are my choice.
    • pulls is the list query.
    • words is the per-pull studio word lookups.
    • labels covers the answered-tells lookup and the label reads together, because I did not give the tells lookup its own phase.
  • Not done: I did not time the repo load and facet parsing, which happen before the session phase. I did not touch other pages.

To try it, run curl -sI against /<owner>/<repo>/pulls and read the server-timing header. Or run bun test test/pulls-list-timing.test.ts.

Approved — before the latest push

Matches the runs-list pattern (takeSessionTime, notePhase), adds no markup, and the test asserts the exact phase order, so it fails without the change. I could not reach the preview from my sandbox, so I judged from the diff and the code only. Next: (1) the labels phase also covers tellsAnswered, so give that read its own tells phase; the issue asked for each read by name. (2) The phase before session (repo load and facet parsing) is still untimed; name it.

commented

The full gate on land was red and named no test; the pull is open again.

commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs