workerStart (Navigation Timing 2 API) is zero even when the HTML document is served by service worker
Reported by
sveerava...@linkedin.com,
Jun 13 2017
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 Steps to reproduce the problem: 1. Browse to a website which has service workers with offline behavior and make sure that service worker is installed. ex: https://jakearchibald.github.io/trained-to-thrill/ 2. Visit the site again. 3. window.performance.getEntriesByType('navigation')[0].workerStart returns zero What is the expected behavior? This attribute should return the time taken for worker to start. It was implemented as part of https://bugs.chromium.org/p/chromium/issues/detail?id=611276&can=1&q=workerStart&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified and worked previously. What went wrong? It always returns zero Did this work before? Yes Does this work in other browsers? N/A Chrome version: 59.0.3071.86 Channel: stable OS Version: OS X 10.12.3 Flash Version: It worked when I checked a few weeks back. Not sure if there was an upgrade in between which caused this to break.
,
Jun 14 2017
Able to reproduce the issue using latest stable #59.0.3071.86 on Mac 10.12.4, Win 10 and Linux Ubuntu 14.04. Below is the bisect info ======================== Good Build: 59.0.3044.0 (Revision: 457648) Bad Build: 59.0.3045.0 (Revision: 457915) Using per-revision bisect providing the bisect results: You are probably looking for a change made after 457789 (known good), but no later than 457790 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/a9691a68bb9cb7e7d008bfdd881fa27023c8181f..ea6b98729307be8655a597ff4ac559710b7d68c6 Review-Url: https://codereview.chromium.org/2757893002 vasilii@: Could you please take a look into this issue and reassign if this issue is not related to your change. Note: Issue is seen in M61 as well Thanks..!!
,
Jun 14 2017
Kenji, please triage
,
Jun 15 2017
Shubhie, can you take a look? Having a functional workerStart is critical for key PWA partners working latency mitigations. Thanks!
,
Jun 16 2017
The per-revision bisect result doesn't make sense: that change just affects tests and not the Chrome binary. I don't understand the PerformanceNavigationTiming results. workerStart is 0 but so are many other things. Going to a random non-service worker site I see: requestStart: 0 responseEnd: 145.85 responseStart: 0 secureConnectionStart: 0 startTime: 0 workerStart: 0 If startTime, requestStart, responseStart are 0, for a service-worker enabled site I don't know what workerStart would be. I wonder if this is just WAI.
,
Jul 10 2017
I should have recorded how I tested that. Repro steps: 1) Go to http://www.example.com/ 2) In console run performance.getEntriesByType("navigation")[0];
,
Jul 10 2017
,
Jul 10 2017
Looks like something is broken in our NT2 implementation.. Using the example.com test page: > nt = performance.getEntriesByType('navigation')[0] > (performance.timing.responseStart - performance.timing.requestStart) == (nt.responseStart - nt.requestStart) false > (performance.timing.responseStart - performance.timing.requestStart) 5 > (nt.responseStart - nt.requestStart) 0 ^ orthogonal to workerStart, but a good sign that something's not right in our plumbing. NT1 and NT2 should agree. Ditto for workerStart, it seems to always report 0. Hmm...
,
Jul 11 2017
Did a bit of digging, it looks time-origin_ is 0 in navigation timing case, ...because it's not initialized in navigation timing case.
,
Jul 11 2017
This is the change that broke it, I think: https://codereview.chromium.org/2647643004 I have a wip patch that fixes it (by the way it doesn't make (performance.timing.responseStart - performance.timing.requestStart) == (nt.responseStart - nt.requestStart) true due to precision issues)
,
Jul 11 2017
,
Jul 11 2017
And the wpt test was broken too... will fix that as well.
,
Jul 11 2017
Awesome, thanks! was just wondering why the tests didn't catch this :)
,
Jul 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7c6d16f59e7c39e4bd6f2d32645956273e963e5f commit 7c6d16f59e7c39e4bd6f2d32645956273e963e5f Author: Kinuko Yasuda <kinuko@chromium.org> Date: Tue Jul 11 08:35:38 2017 Fix NavigationTiming2 time_origin_ is not initialized in PerformanceResourceTiming ctor for PerformanceNavigationTiming. This got broken in crrev.com/2647643004 Bug: 732622 Change-Id: I735ea6777d88b0e89031654216d74f860e05bcb8 Reviewed-on: https://chromium-review.googlesource.com/566261 Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#485559} [modify] https://crrev.com/7c6d16f59e7c39e4bd6f2d32645956273e963e5f/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_attributes_values.html [modify] https://crrev.com/7c6d16f59e7c39e4bd6f2d32645956273e963e5f/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.cpp [modify] https://crrev.com/7c6d16f59e7c39e4bd6f2d32645956273e963e5f/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h [modify] https://crrev.com/7c6d16f59e7c39e4bd6f2d32645956273e963e5f/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp [modify] https://crrev.com/7c6d16f59e7c39e4bd6f2d32645956273e963e5f/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h
,
Jul 11 2017
Matt: can you verify workerStart on ToT when you have time?
,
Jul 19 2017
Yep, now there are sane numbers on current Dev for both the non-sw case <http://www.example.com/> and the sw case <https://jakearchibald.github.io/trained-to-thrill/>. Nice! |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by sveerava...@linkedin.com
, Jun 13 2017