ServiceWorker.StartWorker.Time is not always recorded |
||
Issue descriptionWhat steps will reproduce the problem? 1. Launch new browser instance 2. In one tab open chrome://histograms/ServiceWorker.StartWorker.Time 3. In second tab open chrome://histograms/ServiceWorker.StopWorker.Time 4. In third tab open https://fetch-event-echo.glitch.me 5. Refresh histogram tabs and observe there is a sample for StartWorker.Time. 6. Open devtools for fetch-event-echo tab and stop the service worker from the application tab. 7. Refresh histograms and observe there is a sample for StopWorker.Time 8. From devtools on fetch-event-echo tab, execute `fetch("/")` to trigger another FetchEvent 9. Observe in devtools that the service worker is running 10. Refresh histograms What is the expected result? The StartWorker.Time histogram should have a new sample from the worker starting in step (8). What happens instead? There is no new StartWorker.Time sample recorded. This is probably a minor issue since worker start time is most critical on navigations. I'm filing the bug, though, since it seems unintentional and might skew analysis of the data.
,
Aug 30
Yes I think you're right. We skip UMA when DevTools is "attached" to the service worker, but I'm not sure what attached means. It looks like once DevTools is open the tab gets poisoned and even if we close DevTools there's no more start timing recorded from that tab. I could see the start worker get recorded with the following: 1. In a new tab, open https://console-print-headers.glitch.me/ 2. In another tab, open chrome://serviceworker-internals/ and stop the worker. 3. In another tab, open chrome://histograms/ServiceWorker.StartWorker.Time 4. Go back to the first tab and click 'fetch from page'. 5. In the histograms tab, refresh, and see a new sample. However once I opened DevTools everything got a bit unpredictable and I had trouble seeing new samples, even after DevTools was closed. That seems a bit unfortunate but probably won't skew data too much. So I think we can call this WAI. Thanks for the detailed report. |
||
►
Sign in to add a comment |
||
Comment 1 by bashi@chromium.org
, Aug 30