author Edgar Chen <>
Wed, 27 Nov 2019 23:22:29 +0000
changeset 505564 4989bb2f4f69eae11fa05cc9386edf3d65ccb0c6
parent 504130 dom/base/UseCounters.conf@38419ebb5494f98d51c34308dfd393b4b2aaec8e
permissions -rw-r--r--
Bug 1202706 - Part 1: Add telemetry histograms for worker use counters; r=chutten,bzbarsky This patch uses similar architecture of use counters of main thread for workers. Which introduces the following format histograms for use counters of workers USE_COUNTER2_*_DEDICATED_WORKER USE_COUNTER2_*_SHARED_WORKER USE_COUNTER2_*_SERVICE_WORKER And add the following histograms used in conjunction with above use counter histograms DEDICATED_WORKER_DESTROYED SHARED_WORKER_DESTROYED SERVICE_WORKER_DESTROYED Differential Revision:

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at

// This file defines a list of use counters, which are things that can
// record usage of Web platform features and then report this information
// through Telemetry.
// The format of this file is very strict.  Each line can be:
//   (a) a blank line
//   (b) a comment, which is a line that begins with "//"
//   (c) one of four possible use counter declarations:
//         method <IDL interface name>.<IDL operation name>
//         attribute <IDL interface name>.<IDL attribute name>
//         custom <any valid identifier> <description>
// The <description> for custom counters will be appended to "Whether a
// dedicated worker " or "Whether a shared worker" or "Whether a service worker
//  ", so phrase it appropriately.  For instance, "constructs a
// Foo object" or "calls Bar.baz('some value')". It may contain any character
// (including whitespace).
// To actually cause use counters to be incremented, DOM methods
// and attributes must have a [UseCounter] extended attribute and be exposed to
// workers in the Web IDL file.
// Custom counters are incremented when
// SetUseCounter(UseCounterWoker::Custom_MyName) is called on a WorkerPrivate
// object.
// You might reasonably ask why we have this file and we require
// annotating things with [UseCounter] in the relevant WebIDL file as
// well.  Generating things from bindings codegen and ensuring all the
// dependencies were correct would have been rather difficult.

// Push API
method PushManager.subscribe
method PushSubscription.unsubscribe

// Console API
method console.assert
method console.clear
method console.count
method console.countReset
method console.debug
method console.error
method console.log
method console.table
method console.trace
method console.warn
method console.dir
method console.dirxml
method console.groupCollapsed
method console.groupEnd
method console.time
method console.timeLog
method console.timeEnd
method console.exception
method console.timeStamp
method console.profile
method console.profileEnd