The PerformanceResourceTiming API has had a `workerStart` value specified for a couple years now. Its defined to represent the time when we trigger a service worker FetchEvent. It will be zero if service workers are not involved.
https://bugzilla.mozilla.org/show_bug.cgi?id=1191943 https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-workerstart This will be available on all platforms. I'm targeting it for release in FF58. It is not behind a pref. The property will always be there. If SW are disabled then the value will always be zero. We have some work going on to try to display service worker timing information in devtools: https://bugzilla.mozilla.org/show_bug.cgi?id=1353798 Chrome has implemented workerStart for a while and there is a WPT test. There are some spec/compat questions to clarify: https://github.com/w3c/resource-timing/issues/118 https://github.com/w3c/resource-timing/issues/119 But I don't think those need to block shipping the property. We can adjust the values as the spec is clarified. Also, one of the reasons I am implementing this now is so we can enable the WPT test. Our PerformanceResourceTiming code is completely broken for SW in e10s right now and we missed it because the test is not passing. (This will be fixed in FF58 as well.) The WPT test is here and is being expanded slightly with our implementation: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html Please let me know if there are questions or concerns. Thanks. Ben _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform