Bug 1529883 - Add telemetry instrumentation to count the number of invocations of the element picker. r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Thu, 07 Mar 2019 19:51:26 +0000
changeset 521546 f115573cf9a8
parent 521545 eee6b5f77d67
child 521547 4619f517e391
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1529883
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529883 - Add telemetry instrumentation to count the number of invocations of the element picker. r=gl Agreed with PM (mbalfanz@mozilla.com) about the intended behavior: number of invocations, not actual picks, is considered sufficient to answer the questions. Differential Revision: https://phabricator.services.mozilla.com/D22310
devtools/client/framework/toolbox.js
toolkit/components/telemetry/Scalars.yaml
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -1345,16 +1345,17 @@ Toolbox.prototype = {
   _onPickerStarting: async function() {
     this.pickerButton.isChecked = true;
     await this.selectTool("inspector", "inspect_dom");
     this.on("select", this.inspector.nodePicker.stop);
   },
 
   _onPickerStarted: async function() {
     this.doc.addEventListener("keypress", this._onPickerKeypress, true);
+    this.telemetry.scalarAdd("devtools.inspector.element_picker_used", 1);
   },
 
   _onPickerStopped: function() {
     this.off("select", this.inspector.nodePicker.stop);
     this.doc.removeEventListener("keypress", this._onPickerKeypress, true);
     this.pickerButton.isChecked = false;
   },
 
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -1257,16 +1257,30 @@ devtools.inspector:
     keyed: true
     notification_emails:
       - dev-developer-tools@lists.mozilla.org
       - gl@mozilla.com
     release_channel_collection: opt-out
     record_in_processes:
       - 'main'
 
+  element_picker_used:
+    bug_numbers:
+      - 1529883
+    description: >
+      Number of times the element picker is used to select an element from the page.
+    expires: "70"
+    kind: uint
+    notification_emails:
+      - dev-developer-tools@lists.mozilla.org
+      - mbalfanz@mozilla.com
+    release_channel_collection: opt-out
+    record_in_processes:
+      - 'main'
+
 devtools.shadowdom:
   shadow_root_displayed:
     bug_numbers:
       - 1470128
     description: >
       Whether the markup view displayed any #shadow-root element in the UI.
     expires: "66"
     kind: boolean