Bug 959275 - Add telemetry support for custom dev tools. r=mratcliffe

This commit is contained in:
Kevin Grandon 2014-02-10 15:54:30 -05:00
parent bde5cb3047
commit 19161d326b
2 changed files with 23 additions and 8 deletions

View File

@ -157,6 +157,11 @@ Telemetry.prototype = {
histogram: "DEVTOOLS_DEVELOPERTOOLBAR_OPENED_BOOLEAN",
userHistogram: "DEVTOOLS_DEVELOPERTOOLBAR_OPENED_PER_USER_FLAG",
timerHistogram: "DEVTOOLS_DEVELOPERTOOLBAR_TIME_ACTIVE_SECONDS"
},
custom: {
histogram: "DEVTOOLS_CUSTOM_OPENED_BOOLEAN",
userHistogram: "DEVTOOLS_CUSTOM_OPENED_PER_USER_FLAG",
timerHistogram: "DEVTOOLS_CUSTOM_TIME_ACTIVE_SECONDS"
}
},
@ -168,14 +173,7 @@ Telemetry.prototype = {
* histogram.
*/
toolOpened: function(id) {
let charts = this._histograms[id];
if (!charts) {
dump('Warning: An attempt was made to open a tool with an id of "' + id +
'", which is not listed in Telemetry._histograms. ' +
"Location: telemetry.js/toolOpened()\n");
return;
}
let charts = this._histograms[id] || this._histograms.custom;
if (charts.histogram) {
this.log(charts.histogram, true);

View File

@ -5187,6 +5187,11 @@
"kind": "boolean",
"description": "How many times has the devtool's Developer Toolbar been opened via the toolbox button?"
},
"DEVTOOLS_CUSTOM_OPENED_BOOLEAN": {
"expires_in_version": "never",
"kind": "boolean",
"description": "How many times has a custom developer tool been opened via the toolbox button?"
},
"DEVTOOLS_OPTIONS_OPENED_PER_USER_FLAG": {
"expires_in_version": "never",
"kind": "flag",
@ -5282,6 +5287,11 @@
"kind": "flag",
"description": "How many users have opened the devtool's Developer Toolbar been opened via the toolbox button?"
},
"DEVTOOLS_CUSTOM_OPENED_PER_USER_FLAG": {
"expires_in_version": "never",
"kind": "flag",
"description": "How many users have opened a custom developer tool via the toolbox button?"
},
"DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS": {
"expires_in_version": "never",
"kind": "exponential",
@ -5422,6 +5432,13 @@
"n_buckets": 100,
"description": "How long has the developer toolbar been active (seconds)"
},
"DEVTOOLS_CUSTOM_TIME_ACTIVE_SECONDS": {
"expires_in_version": "never",
"kind": "exponential",
"high": "10000000",
"n_buckets": 100,
"description": "How long has a custom developer tool been active (seconds)"
},
"BROWSER_IS_USER_DEFAULT": {
"expires_in_version": "never",
"kind": "boolean",