- From: Ilya Grigorik <igrigorik@google.com>
- Date: Fri, 22 May 2015 21:54:35 +0100
- To: Andrea Marchesini <amarchesini@mozilla.com>
- Cc: public-web-perf <public-web-perf@w3.org>, "Akhgari, Ehsan" <ehsan@mozilla.com>, Kenji Baheux <kenjibaheux@google.com>, Kunihiko Sakamoto <ksakamoto@google.com>
- Message-ID: <CADXXVKoDthfCJGqCTJEGLRNVOghZL8NmA-O2pSnA2gG+WAT1pw@mail.gmail.com>
+kenji, ksakamoto Hi Andrea. Thanks for the heads up! FWIW, I believe the spec omission is an oversight on this end. We've recently updated Resource Timing [1] to be exposed to Workers and we just need to do the same for User Timing. Also, similar bug on Chrome side: https://code.google.com/p/chromium/issues/detail?id=465643 [1] https://github.com/w3c/resource-timing/pull/10 On Thu, May 21, 2015 at 12:09 PM, Andrea Marchesini <amarchesini@mozilla.com > wrote: > Hi all, > > I have recently worked on the porting of user timing API in workers in > Firefox. The reason why this is needed is because it will allow the user to > do some useful benchmark when content is loaded and managed from/by > ServiceWorkers. But it's also useful for performance analysis of worker > codes. > > This code is not landed yet because I thought that was important to inform > you first. As the user timing API, from the spec point of view, should not > exposed to workers. > > As probably you know, Firefox already has performance.now() in workers > (Workers, Shared Workers, Service Workers). And now we expose all the User > Timing interfaces: > > PerformanceMark, PerformanceMeasure, PerformanceEntry and the partial > Performance interface as described by the point 4.2: > http://www.w3.org/TR/user-timing/#extensions-performance-interface > > > Our implementation is here: > https://bugzilla.mozilla.org/show_bug.cgi?id=1155761 > > Important points in our code are: > > 1. all the PerformanceEntry buffers/queue are per thread: marks are not > shared between worker and main-thread or workers and other workers. They > are owned by the performance object exposed in the Worker global scope. > This also means that performance.clearMarks() removes the existing marks > only in the current performance object. > > 2. PerformanceTiming is not exposed to workers. The only attribute that > can be used as marker name is 'navigationStart'. > Not sure I follow this. Why are the marker names restricted? Is this related to: https://github.com/w3c/user-timing/issues/1 -- ? > 3. navigationStart is taken from the window PerformanceTiming object when > the worker is created. > For window-less workers (SharedWorkers, ServiceWorkers) navigationStart is > the creation time of the worker itself. > Note that we've recently added workerStart to RT: https://github.com/w3c/resource-timing/pull/18 ig
Received on Friday, 22 May 2015 20:55:45 UTC