DOM APIs UseCounter should work on web workers
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
People
(Reporter: nsm, Assigned: edgar)
References
(Blocks 2 open bugs)
Details
Attachments
(5 files, 1 obsolete file)
We have various DOM APIs used on workers, some of which are going to be used more on workers than on the main thread in the long run (ServiceWorker Cache API, some aspects of Notification API, fetch(), Push), so we should definitely add UseCounter support off main thread.
Updated•6 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
•
|
||
Bug 1410468 is for the Javascript telemetry on workers, this bug is for DOM API use counters on workers.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Liz, we've worked with Product team to put this into Q4 plan. We probably won't make it in 70.
Comment 4•5 years ago
|
||
OK, thanks for letting me know.
Comment 6•5 years ago
|
||
After we're done with other Fission work, we can be switch to this work.
Assignee | ||
Comment 7•5 years ago
|
||
For the DOM APIs use counters on window, we have:
USE_COUNTER2_*_DOCUMENT
andUSE_COUNTER2_*_PAGE
: to record the APIs usages of documents and pages.CONTENT_DOCUMENTS_DESTROYED
.CONTENT_DOCUMENTS_DESTROYED
andTOP_LEVEL_CONTENT_DOCUMENTS_DESTROYED
: telemetry uses as the denominator.
For the use counters on worker, IMHO, we should have separated data for different types of worker, so I plan to add:
USE_COUNTER2_*_DEDICATEDWORKER
,USE_COUNTER2_*_SHAREDWORKER
andUSE_COUNTER2_*_SERVICEWORKER
: the APIs usage for each type of worker.DEDICATEDWORKER_DESTROYED
,SHAREDWORKER_DESTROYED
andSERVICEWORKER_DESTROYED
: As the denominator.
But if we think it is not necessary to distinguish the worker type, then we could just add USE_COUNTER2_*_WORKER
and WORKER_DESTROYED
. What do you think? Thanks.
Comment 8•5 years ago
|
||
Not really my code, but in general I think gathering more specific information is better than less specific information. So we should have separate sets of use counters for each worker type, IMHO.
Comment 9•5 years ago
|
||
I'd prefer separate counters by worker type, yes, as long as it does not slow down the bindings code too much.
Comment 10•5 years ago
|
||
Sorry for the slow response. I don't understand workers deeply but the thing that I think would be interesting to understand for webcompat is how many pages use workers that used a given API, for the kinds of workers (if any?) that are controlled by a single page. Is that reasonable?
Assignee | ||
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
Assignee | ||
Comment 15•5 years ago
|
||
Assignee | ||
Comment 16•5 years ago
•
|
||
Assignee | ||
Comment 17•5 years ago
|
||
(In reply to Tim Smith 👨🔬 [:tdsmith] from comment #10)
Sorry for the slow response. I don't understand workers deeply but the thing that I think would be interesting to understand for webcompat is how many pages use workers that used a given API, for the kinds of workers (if any?) that are controlled by a single page. Is that reasonable?
Yes, I think it is reasonable to record such information for the worker that is controlled by a single page, i.e dedicated worker. Especially if a page creates a lot of workers that use a given API, we could have a more accurate overview from page points of view.
Assignee | ||
Comment 18•5 years ago
|
||
Hi chutten, would you mind also take a look at the telemetry changes in part1 patch? Thank you.
Assignee | ||
Comment 19•5 years ago
|
||
Assignee | ||
Comment 20•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 21•5 years ago
|
||
Comment on attachment 9111607 [details] data_collection_request_form Tim, could you help to complete the data review request form, especially for the > 9). Please provide a general description of how you will analyze this data. and > 10). Where do you intend to share the results of your analysis? Thanks
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Thanks!
Comment 23•5 years ago
|
||
Comment on attachment 9111798 [details] Data review request DATA COLLECTION REVIEW RESPONSE: Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate? Yes. This collection is Telemetry so is documented in its definitions file [UseCountersWorker.conf](https://hg.mozilla.org/mozilla-central/file/tip/dom/base/UseCountersWorker.conf) and the [Probe Dictionary](https://telemetry.mozilla.org/probe-dictionary/). Is there a control mechanism that allows the user to turn the data collection on and off? Yes. This collection is Telemetry so can be controlled through Firefox's Preferences. If the request is for permanent data collection, is there someone who will monitor the data over time? Yes, :tdsmith is responsible. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under? Category 1, Technical. Is the data collection request for default-on or default-off? Default on for all channels. Does the instrumentation include the addition of any new identifiers? No. Is the data collection covered by the existing Firefox privacy notice? Yes. Does there need to be a check-in in the future to determine whether to renew the data? No. This collection is permanent. --- Result: datareview+
Comment 24•5 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/38419ebb5494 Part 1: Add telemetry histograms for worker use counters; r=chutten,bzbarsky https://hg.mozilla.org/integration/autoland/rev/b8068238928b Part 2: Add support for recording and reporting use counters for workers; r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/5b8427cf16b3 Part 3: Hook up worker use counters to WebIDL bindings; r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/10409e01c086 Part 4: Add tests for worker use counters; r=bzbarsky
Comment 25•5 years ago
|
||
Backed out 4 changesets (bug 1202706) for causing mochitest assertion failures on BindingUtils.cpp
Backout revision https://hg.mozilla.org/integration/autoland/rev/936f60dbf17552cf8aa929caca86774d211d9877
Failure logs: for 11 https://treeherder.mozilla.org/logviewer.html#?job_id=278523060&repo=autoland
for 7 https://treeherder.mozilla.org/logviewer.html#?job_id=278528057&repo=autoland
Edgar can you please take a look?
Assignee | ||
Comment 26•5 years ago
|
||
Comment 27•5 years ago
|
||
I confirmed with Webcompat and metrics team that it's good to let this bug ride the train from the nightly after 72 softfreeze.
Should we just move the firefox71-status to wontfix and 72-status to fixoptional?
Updated•5 years ago
|
Updated•5 years ago
|
Comment 28•5 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4989bb2f4f69 Part 1: Add telemetry histograms for worker use counters; r=chutten,bzbarsky https://hg.mozilla.org/integration/autoland/rev/9eeb03a503fb Part 2: Add support for recording and reporting use counters for workers; r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/95b8b6b94213 Part 3: Hook up worker use counters to WebIDL bindings; r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/2dfc53add3de Part 4: Add tests for worker use counters; r=bzbarsky
Comment 29•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4989bb2f4f69
https://hg.mozilla.org/mozilla-central/rev/9eeb03a503fb
https://hg.mozilla.org/mozilla-central/rev/95b8b6b94213
https://hg.mozilla.org/mozilla-central/rev/2dfc53add3de
Updated•5 years ago
|
Description
•