New issue
Advanced search Search tips

Issue 668946 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: 2017-01-12
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Resource Timing within the context of a service worker (workerStart in particular seems unhooked)

Project Member Reported by kenjibaheux@chromium.org, Nov 28 2016

Issue description

It appears that workerStart is never non-zero in a SW context.

Context: this came up while talking to a third party provider looking into using Foreign Fetch / Foreign Service Worker to enhance their offering. They want to track the latency impact of this approach and were surprised by not being able to capture a non zero workerStart for the initial request which should have resulted in creating a new worker.

Is workerStart properly hooked up within the SW context?
I assume that the spec already allows this information to be available within the SW context. But if it does not, the use case seems quite reasonable.
 
The use case assumes that a SW gets to see Resource timing entries for the requests that are in its scope.

Example:
<link rel="style" href="https://example.com/this.css">

where this.css responds with a foreign service worker header (https://example.com/sw.js scope:/).

with sw.js, the developer expects being able to obtain information about the "this.css" request (i.e. workerStart, etc.), perhaps at some later point (e.g. subsequent request).




Components: Blink>ServiceWorker

Comment 3 by mek@chromium.org, Dec 9 2016

Cc: igrigo...@chromium.org
I'm not sure I'm the right person for this... Also I'm not sure what the spec currently does and doesn't specify with regards to service workers... I agree that it would be interesting for the service worker to be able to get performance metrics for requests it handles, rather than just for requests it makes, but I have no idea if that is spec'ed and/or implemented.

It doesn't even seem like resource timing for requests made by a service worker are correctly reported currently. Unless I'm misunderstanding what is supposed to work. For example I do get resource timing entries for fetches made by Cache.add(someUrl), but I don't get anything for the equivalent fetch(someUrl).

Kenji: could we move this discussion to an RT issue on GitHub? [1]

The behavior you're describing above seems to make sense to me (on first pass, at least), and it's something we need to discuss and clarify in the spec.

[1] https://github.com/w3c/resource-timing/issues

Comment 5 by falken@chromium.org, Dec 16 2016

Cc: mek@chromium.org
Owner: kenjibaheux@chromium.org
Status: Assigned (was: Untriaged)
Over to Kenji for filing GitHub bug.
Labels: Needs-Feedback
NextAction: 2017-01-12
Filed one: https://github.com/w3c/resource-timing/issues/88
(bug triaging process) kindly ping for an expired NextAction bug:)

Owner: ----
Status: Archived (was: Assigned)
This needs to be resolved in spec land first.
The urgency on this has dropped (the original motivating factor was to allow a partner to assess the impact of foreign fetch).

Archiving, we can re-open a new bug if this becomes a priority again.

Sign in to add a comment