Bug 1405585 - Add telemetry to watch inspector delay between new-root event and full update. r=francois,jdescottes datareview=francois

MozReview-Commit-ID: 5cWcTxPvDKF

--HG--
extra : rebase_source : 9e1a2c4b6aa6eee200c4d653b951f4e5e9cd0e9a
This commit is contained in:
Alexandre Poirot 2017-10-23 11:04:52 -07:00
Родитель 661494c527
Коммит d147923f5d
2 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@ -848,6 +848,9 @@ Inspector.prototype = {
* Reset the inspector on new root mutation.
*/
onNewRoot: function () {
// Record new-root timing for telemetry
this._newRootStart = this.panelWin.performance.now();
this._defaultNode = null;
this.selection.setNodeFront(null);
this._destroyMarkup();
@ -900,6 +903,18 @@ Inspector.prototype = {
yield onExpand;
this.emit("reloaded");
// Record the time between new-root event and inspector fully loaded.
if (this._newRootStart) {
// Only log the timing when inspector is in foreground.
if (this.toolbox.currentToolId == "inspector") {
let delay = this.panelWin.performance.now() - this._newRootStart;
let telemetryKey = "DEVTOOLS_INSPECTOR_NEW_ROOT_TO_RELOAD_DELAY_MS";
let histogram = Services.telemetry.getHistogramById(telemetryKey);
histogram.add(delay);
}
delete this._newRootStart;
}
}),
_selectionCssSelector: null,

Просмотреть файл

@ -8446,6 +8446,16 @@
"keyed": true,
"description": "Time taken (in ms) to update DevTools panel when reloading a page. This is keyed by tool ID being currently opened [inspector, webconsole, jsdebugger, styleeditor, shadereditor, canvasdebugger, performance, memory, netmonitor, storage, webaudioeditor, scratchpad, dom]."
},
"DEVTOOLS_INSPECTOR_NEW_ROOT_TO_RELOAD_DELAY_MS": {
"record_in_processes": ["main"],
"alert_emails": ["dev-developer-tools@lists.mozilla.org", "hkirschner@mozilla.com"],
"bug_numbers": [1405585],
"expires_in_version": "62",
"kind": "exponential",
"high": 120000,
"n_buckets": 100,
"description": "Time taken (in ms) to update the inspector during a page reload, starting from new-root event."
},
"DEVTOOLS_DEBUGGER_DISPLAY_SOURCE_LOCAL_MS": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",