Issue #21 - Remove Telemetry accumulation/structures from toolkit js.

This fixes toolkit modules and prevents toolkit component breakage.
Also removes about:telemetry
This commit is contained in:
Moonchild 2021-10-29 19:53:54 +00:00 • committed by roytam1
commit 44388b01a3
42 changed files with 22 additions and 3581 deletions

View file

@ -19,9 +19,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PerformanceWatcher",
"resource://gre/modules/PerformanceWatcher.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
"@mozilla.org/base/telemetry;1",
Ci.nsITelemetry);
XPCOMUtils.defineLazyModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "IdleService",
@ -123,15 +120,6 @@ this.AddonWatcher = {
return;
}
// Report immediately to Telemetry, regardless of whether we report to
// the user.
for (let {source: {addonId}, details} of addons) {
Telemetry.getKeyedHistogramById("PERF_MONITORING_SLOW_ADDON_JANK_US").
add(addonId, details.highestJank);
Telemetry.getKeyedHistogramById("PERF_MONITORING_SLOW_ADDON_CPOW_US").
add(addonId, details.highestCPOW);
}
// We expect that users don't care about real-time alerts unless their
// browser is going very, very slowly. Therefore, we use the following
// heuristic: