Re: [whatwg/fetch] Initial resource timing integration. (#1185)

Commit message:

Take note of the different timings required for the [resource timing spec](https://w3c.github.io/resource-timing).

The particular points where time is measured is based on the current Resource Timing spec, and the missing parts reflect current implementations:

- `fetchStart`, `requestStart`, `responseStart`, `redirectStart`, `redirectEnd`, `workerStart`, `encodedBodySize` and `decodedBodySize` are handled as part of the FETCH processing model
- the rest of the metrics are handled as requirements given to the HTTP connection obtaining processing model, which is not in itself part of the FETCH spec.

Note that FETCH doesn't decide when to enqueue the resource timing entry, but rather creates the data structure that holds the different timings, and it's up to the caller to enqueue. FETCH sends a new event, `processResponseDone`, when the response is closed or EOFs, which lets callers like the `fetch()` API enqueue the entry at the right time.
This change also makes that call as part of `fetch()`.

It's the first phase for addressing https://github.com/w3c/resource-timing/issues/252

The effort to fully integrate ResourceTiming/NavigationTiming with FETCH/HTML spans over several repos, and it is tracked in this document: https://docs.google.com/document/d/1c9q0frGeIuhINTr7k6IiR1oLb6oDkkCTbRn0sk1mmdE/edit?usp=sharing





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1185#issuecomment-806004112

Received on Wednesday, 24 March 2021 17:11:00 UTC