Bug 860493 - Add telemetry for history swipe animations. r=spohl,felipe

This commit is contained in:
David Rajchenbach-Teller 2013-11-11 13:20:35 -05:00
parent d1025ea211
commit 62608e4dda
2 changed files with 43 additions and 17 deletions

View File

@ -2,6 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
// Simple gestures support
//
// As per bug #412486, web content must not be allowed to receive any
@ -941,9 +943,13 @@ let gHistorySwipeAnimation = {
(gBrowser.webNavigation.sessionHistory.index < 0))
return;
let canvas = null;
TelemetryStopwatch.start("FX_GESTURE_TAKE_SNAPSHOT_OF_PAGE");
try {
let browser = gBrowser.selectedBrowser;
let r = browser.getBoundingClientRect();
let canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
canvas = document.createElementNS("http://www.w3.org/1999/xhtml",
"canvas");
canvas.mozOpaque = true;
canvas.width = r.width;
@ -956,9 +962,17 @@ let gHistorySwipeAnimation = {
ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_VIEW |
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
} finally {
TelemetryStopwatch.finish("FX_GESTURE_TAKE_SNAPSHOT_OF_PAGE");
}
TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
try {
this._installCurrentPageSnapshot(canvas);
this._assignSnapshotToCurrentBrowser(canvas);
} finally {
TelemetryStopwatch.finish("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
}
},
/**

View File

@ -2627,6 +2627,18 @@
"n_buckets": 20,
"description": "Gloda: indexing rate (message/s)"
},
"FX_GESTURE_TAKE_SNAPSHOT_OF_PAGE": {
"kind": "exponential",
"high": "1000",
"n_buckets": "30",
"description": "Firefox: Time taken to capture the page to a canvas, for reuse while swiping through history (ms)."
},
"FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE": {
"kind": "exponential",
"high": "1000",
"n_buckets": "30",
"description": "Firefox: Time taken to store the image capture of the page to a canvas, for reuse while swiping through history (ms)."
},
"FX_TAB_ANIM_OPEN_MS": {
"kind": "exponential",
"high": "3000",