Bug 723165 - Telemetry for time needed to show the Bookmarks toolbar.

r=dietrich
This commit is contained in:
Marco Bonardo 2012-02-09 11:10:15 +01:00
parent 203e2b77b0
commit 4f32695f7b
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,7 @@
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
/**
* The base view implements everything that's common to the toolbar and
@ -808,6 +809,7 @@ PlacesViewBase.prototype = {
};
function PlacesToolbar(aPlace) {
let startTime = Date.now();
// Add some smart getters for our elements.
let thisView = this;
[
@ -836,6 +838,9 @@ function PlacesToolbar(aPlace) {
this._addEventListeners(window, ["resize", "unload"], false);
PlacesViewBase.call(this, aPlace);
Services.telemetry.getHistogramById("FX_BOOKMARKS_TOOLBAR_INIT_MS")
.add(Date.now() - startTime);
}
PlacesToolbar.prototype = {

View File

@ -324,6 +324,7 @@ HISTOGRAM_BOOLEAN(FX_CONTEXT_SEARCH_AND_TAB_SELECT, "Firefox: Background tab was
HISTOGRAM_BOOLEAN(FX_KEYWORD_URL_USERSET, "Firefox: keyword.URL has a user-set value")
HISTOGRAM(FX_IDENTITY_POPUP_OPEN_MS, 1, 1000, 10, EXPONENTIAL, "Firefox: Time taken by the identity popup to open in milliseconds")
HISTOGRAM(FX_APP_MENU_OPEN_MS, 1, 1000, 10, EXPONENTIAL, "Firefox: Time taken by the app-menu opening in milliseconds")
HISTOGRAM(FX_BOOKMARKS_TOOLBAR_INIT_MS, 50, 5000, 10, EXPONENTIAL, "Firefox: Time to initialize the bookmarks toolbar view (ms)")
/**
* Thumbnail Service telemetry.