mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-19 21:57:30 +09:00
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:
parent
8d800b1cb0
commit
44388b01a3
42 changed files with 22 additions and 3581 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue