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

@ -169,7 +169,7 @@ public:
* as the AbstractResult is cycle-collected.
*
* @param aStartDate The instant at which the operation was
* requested. Used to collect Telemetry statistics.
* requested.
*/
explicit AbstractResult(TimeStamp aStartDate)
: mStartDate(aStartDate)
@ -182,7 +182,7 @@ public:
* Setup the AbstractResult once data is available.
*
* @param aDispatchDate The instant at which the IO thread received
* the operation request. Used to collect Telemetry statistics.
* the operation request.
* @param aExecutionDuration The duration of the operation on the
* IO thread.
*/

View file

@ -434,34 +434,11 @@ var Scheduler = this.Scheduler = {
Scheduler.Debugging.latestReceived = [Date.now(), error.message, error.fileName, error.lineNumber];
throw error;
} finally {
if (firstLaunch) {
Scheduler._updateTelemetry();
}
Scheduler.restartTimer();
}
}.bind(this)));
},
/**
* Post Telemetry statistics.
*
* This is only useful on first launch.
*/
_updateTelemetry: function() {
let worker = this.worker;
let workerTimeStamps = worker.workerTimeStamps;
if (!workerTimeStamps) {
// If the first call to OS.File results in an uncaught errors,
// the timestamps are absent. As this case is a developer error,
// let's not waste time attempting to extract telemetry from it.
return;
}
let HISTOGRAM_LAUNCH = Services.telemetry.getHistogramById("OSFILE_WORKER_LAUNCH_MS");
HISTOGRAM_LAUNCH.add(worker.workerTimeStamps.entered - worker.launchTimeStamp);
let HISTOGRAM_READY = Services.telemetry.getHistogramById("OSFILE_WORKER_READY_MS");
HISTOGRAM_READY.add(worker.workerTimeStamps.loaded - worker.launchTimeStamp);
}
};
const PREF_OSFILE_LOG = "toolkit.osfile.log";

View file

@ -12,7 +12,6 @@ if (this.Components) {
(function(exports) {
"use strict";
// Timestamps, for use in Telemetry.
// The object is set to |null| once it has been sent
// to the main thread.
let timeStamps = {