Skip to content

Commit

Permalink
add workerStart attribute to measure SW startup
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Apr 3, 2015
1 parent 280d515 commit 979980b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ <h3>The <code>PerformanceNavigationTiming</code> interface</h3>
with a time value equal to zero.</p>
</dd>

<dt>readonly attribute DOMHighResTimeStamp workerStart</dt>
<dd>If the current document has an <a href="http://www.w3.org/TR/service-workers/#dfn-containing-service-worker-registration">active service worker registration</a> ([[!SERVICE-WORKERS]]), this atribute MUST return the time immediately before the user agent <a href="http://www.w3.org/TR/service-workers/#service-worker-concept">ran the worker</a> required to service the request, or if the worker was already available, the time immediately before the user agent <a href="http://www.w3.org/TR/service-workers/#on-fetch-request-algorithm">fired an event named `fetch`</a> at the <a href="http://www.w3.org/TR/service-workers/#dfn-active-worker">active worker</a>. Otherwise, if there is no active worker this attribute MUST return zero.</dd>

<dt>readonly attribute DOMHighResTimeStamp linkNegotiationStart</dt>
<dd>
<p>This attribute is optional. User agents that don't have this attribute
Expand Down Expand Up @@ -882,8 +885,7 @@ <h3>Processing Model</h3>
<a href="#widl-PerformanceNavigationTiming-unloadEventEnd">unloadEventEnd</a> to 0 then go to step
<a href="#step-linknegotiation-start">9</a>. Otherwise, record <a href="#widl-PerformanceNavigationTiming-unloadEventEnd">unloadEventStart</a>
as the time immediately before the unload event.</li>
<li>Immediately after the unload event is completed,
record the current time as <a href="#widl-PerformanceNavigationTiming-unloadEventEnd">unloadEventEnd</a>.</li>
<li>Immediately after the unload event is completed, record the current time as <a href="#widl-PerformanceNavigationTiming-unloadEventEnd">unloadEventEnd</a>. If the navigation URL has an <a href="http://www.w3.org/TR/service-workers/#dfn-active-worker">active worker registration</a>, immediately before the user agent <a href="http://www.w3.org/TR/service-workers/#service-worker-concept">runs the worker</a> record the time as <a href="#widl-PerformanceResourceTiming-workerStart">workerStart</a>, or if the worker is available, record the time before the <a href="http://www.w3.org/TR/service-workers/#on-fetch-request-algorithm">event named `fetch` is fired</a> at the active worker. Otherwise, if the navigation URL has no matching <a href="http://www.w3.org/TR/service-workers/#dfn-service-worker-registration">service worker registration</a>, set <a href="#widl-PerformanceResourceTiming-workerStart">workerStart</a> value to zero.</li>
<li id="step-linknegotiation-start">If the navigation requires the network interface to be powered on or cycled, record the time immediately before doing that as <a href="#widl-PerformanceNavigationTiming-linkNegotiationStart">linkNegotiationStart</a>, and record the time immediately after the network interface becomes available as <a href="#widl-PerformanceNavigationTiming-linkNegotiationEnd">linkNegotiationEnd</a>. If the network interface was immediately available, let <a href="#widl-PerformanceNavigationTiming-linkNegotiationStart">linkNegotiationStart</a> and <a href="#widl-PerformanceNavigationTiming-linkNegotiationEnd">linkNegotiationEnd</a> be the same value as <a href="#widl-PerformanceNavigationTiming-startTime">startTime</a>.</li>
<li id="step-fetch-start">If the new resource is to be fetched using HTTP GET
or <a href="http://www.w3.org/TR/html5/infrastructure.html#concept-http-equivalent-get" title='HTTP GET method equivalence'>equivalent</a>,
Expand Down

0 comments on commit 979980b

Please sign in to comment.