Bug 1385453 - Add Telemetry to measure how successful speculative tab warming is when switching tabs. r=billm,liuche, data-review=liuche

MozReview-Commit-ID: GSMEE3IUlzN

--HG--
extra : rebase_source : be219d2caea47e5050efa3414e941e10bd1ee1e8
This commit is contained in:
Mike Conley 2017-08-09 16:45:33 -04:00
Родитель 8900138ae6
Коммит bad1d3e781
2 изменённых файлов: 32 добавлений и 0 удалений

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

@ -4788,6 +4788,23 @@
return;
}
let warmingState = "disqualified";
if (this.warmingTabs.has(tab)) {
let tabState = this.getTabState(tab);
if (tabState == this.STATE_LOADING) {
warmingState = "stillLoading";
} else if (tabState == this.STATE_LOADED) {
warmingState = "loaded";
}
} else if (this.canWarmTab(tab)) {
warmingState = "notWarmed";
}
Services.telemetry
.getHistogramById("FX_TAB_SWITCH_REQUEST_TAB_WARMING_STATE")
.add(warmingState);
this.unwarmTab(tab);
this._requestingTab = true;

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

@ -6049,6 +6049,21 @@
"releaseChannelCollection": "opt-out",
"description": "Firefox: If the spinner interstitial displays during tab switching, records the time in ms the graphic is visible. This probe is similar to FX_TAB_SWITCH_SPINNER_VISIBLE_MS, but is for truly degenerate cases."
},
"FX_TAB_SWITCH_REQUEST_TAB_WARMING_STATE": {
"record_in_processes": ["main"],
"expires_in_version": "63",
"alert_emails": ["mconley@mozilla.com"],
"releaseChannelCollection": "opt-out",
"kind": "categorical",
"labels": [
"disqualified",
"notWarmed",
"stillLoading",
"loaded"
],
"bug_numbers": [1385453],
"description": "Firefox: When a tab is selected, records whether or not the tab was speculatively 'warmed up' to improve tab switch time."
},
"FX_TAB_CLICK_MS": {
"record_in_processes": ["main", "content"],
"expires_in_version": "default",