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

@noamr commented on this pull request.



> @@ -1055,6 +1083,9 @@ must be an algorithm accepting an exception.
    <dd>
     <ol>
      <li><p>Let <var>continueAlgorithm</var> be null.
+     <li><p>If <var>timingInfo</var> is not null, and <var>timingInfo</var>'s
+     <a for="fetch timing info">response start time</a> is not zero, set <var>timingInfo</var>'s
+     <a for="fetch timing info">response start time</a> to the result of calling <a for=/>current time</a>.

No, since `current-high-resolution-time` assumes a `current global` which is not defined for `fetch`.
An alternative would be to define `present time` in the `hr-time` spec, as referenced in `current-high-resolution-time` first bullet, perhaps specify it as `value returned from the global monotonic clock` (or something similar).

>  </dl>
 
+<p>A <dfn>fetch timing info</dfn> is a <a for=/>struct</a> used to maintain timing information
+later required by the resource timing and navigation timiing specs. It has the following <a for=struct>items</a>:

OK

> +  <dt><dfn for="fetch timing info">response end time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">alpn negotiated protocol</dfn> (default null)
+  <dd>Null or a string.
+
+  <dt><dfn for="fetch timing info">worker start time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">domain lookup start time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">domain lookup end time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">connection start time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">connection end time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">secure connection start time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">request start time</dfn> (default zero)
+  <dt><dfn for="fetch timing info">transfer size</dfn> (default zero)
+  <dt><dfn for="fetch timing info">encoded body size</dfn> (default zero)
+  <dt><dfn for="fetch timing info">decoded body size</dfn> (default zero)
+</dl>
+

Ack

> @@ -3348,6 +3396,8 @@ the request.
  <li><p>Run <a>main fetch</a> given <var>fetchParams</var>.
 </ol>
 
+<h3 id="sec-current-time">Current Time</h3>
+The <dfn>current time</dfn> is the present time given the <a for=/>global monotonic clock</a>.

See above, we need a new definition as we don't have a `current global` and we want to use the `global monotonic clock` and not rely on a `time origin`. But this new definition should maybe be a PR to `HR-TIME`.

-- 
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#discussion_r586147442

Received on Wednesday, 3 March 2021 06:23:00 UTC