Bug 938189 - Add telemetry for kicking off snapshot compression. r=felipe

This commit is contained in:
Stephen Pohl 2013-11-15 21:46:40 -05:00
parent 9cca770bbd
commit 431a304374
2 changed files with 22 additions and 11 deletions

View File

@ -1042,18 +1042,23 @@ let gHistorySwipeAnimation = {
return;
}
let browser = gBrowser.selectedBrowser;
let snapshots = browser.snapshots;
let currIndex = browser.webNavigation.sessionHistory.index;
TelemetryStopwatch.start("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
try {
let browser = gBrowser.selectedBrowser;
let snapshots = browser.snapshots;
let currIndex = browser.webNavigation.sessionHistory.index;
// Kick off snapshot compression.
let canvas = snapshots[currIndex].image;
canvas.toBlob(function(aBlob) {
if (snapshots[currIndex]) {
snapshots[currIndex].image = aBlob;
}
}, "image/png"
);
// Kick off snapshot compression.
let canvas = snapshots[currIndex].image;
canvas.toBlob(function(aBlob) {
if (snapshots[currIndex]) {
snapshots[currIndex].image = aBlob;
}
}, "image/png"
);
} finally {
TelemetryStopwatch.finish("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
}
},
/**

View File

@ -2639,6 +2639,12 @@
"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_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE": {
"kind": "exponential",
"high": "1000",
"n_buckets": "30",
"description": "Firefox: Time taken to kick off image compression of the canvas that will be used during swiping through history (ms)."
},
"FX_TAB_ANIM_OPEN_MS": {
"kind": "exponential",
"high": "3000",