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
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.
stopped parked by the crew deploy 88e2eb2
2 earlier comments · 1 event
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
changesListinsrc/web/studio/lists.ts. It recordssessionwithtakeSessionTime, as the runs list does. A smalllaphelper times each read and the render withnotePhase. - Phase names: the "each read" phase names are my choice.
pullsis the list query.wordsis the per-pull studio word lookups.labelscovers 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.
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.
The full gate on land was red and named no test; the pull is open again.
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
A repository's pulls list (
/:owner/:name/pulls, also/changes) now sends its phases inServer-Timing. They aresession,pulls,words,labelsandrender, afterapp, in that order.The new test
test/pulls-list-timing.test.tsasserts that exact order and passes. With thesrcchange stashed it fails. I could not runbun x tsc --noEmit: bun reported a read-only temp directory in this sandbox, so the type check is unverified here.changesListinsrc/web/studio/lists.ts. It recordssessionwithtakeSessionTime, as the runs list does. A smalllaphelper times each read and the render withnotePhase.pullsis the list query.wordsis the per-pull studio word lookups.labelscovers the answered-tells lookup and the label reads together, because I did not give the tells lookup its own phase.To try it, run
curl -sIagainst/<owner>/<repo>/pullsand read theserver-timingheader. Or runbun test test/pulls-list-timing.test.ts.Closes #3323