Bug 1639454: Introduce OPENED_COUNT and TIME_ACTIVE_SECONDS telemetry for the compatibility panel. r=Honza
authorDaisuke Akatsuka <daisuke@birchill.co.jp>
Wed, 27 May 2020 07:09:22 +0000
changeset 532321 1109bd345ac2f3c610c2baa0791825f95c1b6bdd
parent 532320 d97315ba56440fdfe2bd42ca52214aebabd0344f
child 532322 aa836c2449d5b3a8342a836fba49231aedeac1e9
push id37454
push userccoroiu@mozilla.com
push dateWed, 27 May 2020 16:14:31 +0000
treeherdermozilla-central@a1dd9afbfdf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1639454
milestone78.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 1639454: Introduce OPENED_COUNT and TIME_ACTIVE_SECONDS telemetry for the compatibility panel. r=Honza Differential Revision: https://phabricator.services.mozilla.com/D76261
devtools/client/inspector/test/browser_inspector_sidebarstate.js
devtools/client/shared/telemetry.js
toolkit/components/telemetry/Events.yaml
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-allowlists.json
--- a/devtools/client/inspector/test/browser_inspector_sidebarstate.js
+++ b/devtools/client/inspector/test/browser_inspector_sidebarstate.js
@@ -27,16 +27,26 @@ const TELEMETRY_DATA = [
     extra: {
       time_open: "",
     },
   },
   {
     timestamp: null,
     category: "devtools.main",
     method: "tool_timer",
+    object: "compatibilityview",
+    value: null,
+    extra: {
+      time_open: "",
+    },
+  },
+  {
+    timestamp: null,
+    category: "devtools.main",
+    method: "tool_timer",
     object: "computedview",
     value: null,
     extra: {
       time_open: "",
     },
   },
 ];
 
@@ -54,16 +64,25 @@ add_task(async function() {
   inspector.sidebar.select("fontinspector");
 
   is(
     inspector.sidebar.getCurrentTabID(),
     "fontinspector",
     "Font Inspector is selected"
   );
 
+  info("Selecting compatibility view.");
+  inspector.sidebar.select("compatibilityview");
+
+  is(
+    inspector.sidebar.getCurrentTabID(),
+    "compatibilityview",
+    "Compatibility View is selected"
+  );
+
   info("Selecting computed view.");
   inspector.sidebar.select("computedview");
 
   is(
     inspector.sidebar.getCurrentTabID(),
     "computedview",
     "Computed View is selected"
   );
--- a/devtools/client/shared/telemetry.js
+++ b/devtools/client/shared/telemetry.js
@@ -765,16 +765,17 @@ function getChartsFromToolId(id) {
       countScalar = `devtools.accessibility.picker_used_count`;
       break;
     case "CHANGESVIEW":
       useTimedEvent = true;
       timerHist = `DEVTOOLS_${id}_TIME_ACTIVE_SECONDS`;
       countScalar = `devtools.${lowerCaseId}.opened_count`;
       break;
     case "ANIMATIONINSPECTOR":
+    case "COMPATIBILITYVIEW":
     case "COMPUTEDVIEW":
     case "FONTINSPECTOR":
     case "LAYOUTVIEW":
     case "RULEVIEW":
       useTimedEvent = true;
       timerHist = `DEVTOOLS_${id}_TIME_ACTIVE_SECONDS`;
       countHist = `DEVTOOLS_${id}_OPENED_COUNT`;
       break;
--- a/toolkit/components/telemetry/Events.yaml
+++ b/toolkit/components/telemetry/Events.yaml
@@ -1628,18 +1628,18 @@ devtools.main:
     record_in_processes: ["main"]
     description: User has changed the throttle setting in the netmonitor.
     release_channel_collection: opt-out
     expiry_version: never
     extra_keys:
       mode: No throttling, GPRS, Regular 2G, Good 2G, Regular 3G, Good 3G, Regular 4G / LTE, DSL or WI-FI.
       session_id: The toolbox session start time e.g. 13963.
   tool_timer:
-    objects: ["animationinspector", "computedview", "changesview", "fontinspector", "layoutview", "ruleview"]
-    bug_numbers: [1483817]
+    objects: ["animationinspector", "compatibilityview", "computedview", "changesview", "fontinspector", "layoutview", "ruleview"]
+    bug_numbers: [1483817, 1639454]
     notification_emails: ["dev-developer-tools@lists.mozilla.org", "hkirschner@mozilla.com"]
     products:
       - "firefox"
       - "fennec"
       - "geckoview"
     record_in_processes: ["main"]
     description: The amount of time a tool was opened for.
     release_channel_collection: opt-out
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -10286,16 +10286,26 @@
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-developer-tools@lists.mozilla.org", "jan@mozilla.com"],
     "expires_in_version": "never",
     "kind": "count",
     "bug_numbers": [1247985, 1204601],
     "description": "Number of times about:debugging has been opened.",
     "releaseChannelCollection": "opt-out"
   },
+  "DEVTOOLS_COMPATIBILITYVIEW_OPENED_COUNT": {
+    "record_in_processes": ["main", "content"],
+    "products": ["firefox", "fennec", "geckoview"],
+    "alert_emails": ["dev-developer-tools@lists.mozilla.org"],
+    "expires_in_version": "never",
+    "kind": "count",
+    "bug_numbers": [1639454],
+    "description": "Number of times the DevTools Compatibility View has been opened.",
+    "releaseChannelCollection": "opt-out"
+  },
   "DEVTOOLS_CUSTOM_OPENED_COUNT": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-developer-tools@lists.mozilla.org"],
     "expires_in_version": "never",
     "kind": "count",
     "bug_numbers": [1247985],
     "description": "Number of times a custom developer tool has been opened.",
@@ -10632,16 +10642,28 @@
     "kind": "exponential",
     "high": 10000000,
     "n_buckets": 100,
     "bug_numbers": [1446496],
     "alert_emails": ["dev-developer-tools@lists.mozilla.org", "jryans@mozilla.com"],
     "releaseChannelCollection": "opt-out",
     "description": "How long has about:debugging been active? (seconds) (bug 1204601)"
   },
+  "DEVTOOLS_COMPATIBILITYVIEW_TIME_ACTIVE_SECONDS": {
+    "record_in_processes": ["main", "content"],
+    "products": ["firefox", "fennec", "geckoview"],
+    "expires_in_version": "never",
+    "kind": "exponential",
+    "high": 10000000,
+    "n_buckets": 100,
+    "bug_numbers": [1639454],
+    "alert_emails": ["dev-developer-tools@lists.mozilla.org"],
+    "releaseChannelCollection": "opt-out",
+    "description": "How long has the compatibility view been active (seconds)"
+  },
   "DEVTOOLS_CUSTOM_TIME_ACTIVE_SECONDS": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 10000000,
     "n_buckets": 100,
     "bug_numbers": [1446496],
--- a/toolkit/components/telemetry/histogram-allowlists.json
+++ b/toolkit/components/telemetry/histogram-allowlists.json
@@ -1155,16 +1155,17 @@
     "D3D11_SYNC_HANDLE_FAILURE",
     "DEDICATED_WORKER_SPAWN_GETS_QUEUED",
     "DEDICATED_WORKER_DESTROYED",
     "DEFECTIVE_PERMISSIONS_SQL_REMOVED",
     "DENIED_TRANSLATION_OFFERS",
     "DEVTOOLS_ABOUTDEBUGGING_OPENED_COUNT",
     "DEVTOOLS_ANIMATIONINSPECTOR_OPENED_COUNT",
     "DEVTOOLS_BROWSERCONSOLE_OPENED_COUNT",
+    "DEVTOOLS_COMPATIBILITYVIEW_OPENED_COUNT",
     "DEVTOOLS_COMPUTEDVIEW_OPENED_COUNT",
     "DEVTOOLS_CUSTOM_OPENED_COUNT",
     "DEVTOOLS_DOM_OPENED_COUNT",
     "DEVTOOLS_EYEDROPPER_OPENED_COUNT",
     "DEVTOOLS_FONTINSPECTOR_OPENED_COUNT",
     "DEVTOOLS_INSPECTOR_OPENED_COUNT",
     "DEVTOOLS_JSBROWSERDEBUGGER_OPENED_COUNT",
     "DEVTOOLS_JSDEBUGGER_OPENED_COUNT",