Basilisk: Remove TelemetryStopwatch

This commit is contained in:
Gaming4JC 2018-08-19 18:18:36 -04:00 committed by Roy Tam
commit 4c5dd3bcf8
14 changed files with 8 additions and 212 deletions

View file

@ -13,7 +13,6 @@ const Ci = Components.interfaces;
Cu.import("resource://gre/modules/Timer.jsm", this);
Cu.import("resource://gre/modules/Services.jsm", this);
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
"resource://gre/modules/AppConstants.jsm");
@ -52,19 +51,6 @@ function notify(subject, topic) {
Services.obs.notifyObservers(subject, topic, "");
}
// TelemetryStopwatch helper functions.
function stopWatch(method) {
return function (...histograms) {
for (let hist of histograms) {
TelemetryStopwatch[method]("FX_SESSION_RESTORE_" + hist);
}
};
}
var stopWatchStart = stopWatch("start");
var stopWatchCancel = stopWatch("cancel");
var stopWatchFinish = stopWatch("finish");
/**
* The external API implemented by the SessionSaver module.
*/
@ -182,7 +168,6 @@ var SessionSaverInternal = {
return Promise.resolve();
}
stopWatchStart("COLLECT_DATA_MS", "COLLECT_DATA_LONGEST_OP_MS");
let state = SessionStore.getCurrentState(forceUpdateAllWindows);
PrivacyFilter.filterPrivateWindowsAndTabs(state);
@ -226,7 +211,6 @@ var SessionSaverInternal = {
}
}
stopWatchFinish("COLLECT_DATA_MS", "COLLECT_DATA_LONGEST_OP_MS");
return this._writeState(state);
},