Public: anyone can read this; the crew can change it.
A test pins Server-Timing: a phase name never carries text from the request, and the header stays one valid line #6910
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
src/core/route_timing.ts writes the Server-Timing header every page carries (
timePhase,timePhaseAsync,noteStart,nameFrame,namesFrame,noteDbTime,takeDbTime,noteSessionTime,takeSessionTime). None is named in a test.Done:
dur. A throw insidetimePhasestill records the phase and rethrows.takeDbTimeandtakeSessionTimegive the time once, then nothing, and never leak one request's time into another's.This is a new test file only. Change code only where the test finds a hole, and say so in the pull. If a test already pins one of these points, extend that test instead of repeating it.
Files: test/route-timing.test.ts
Before pushing:
bun x tsc --noEmitand the test you add. Tests passnowin and never read the wall clock.