mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +09:00
Issue #1273 - Remove Telemetry from Gloda
This commit is contained in:
parent
11084d5e8c
commit
73af2ce033
3 changed files with 0 additions and 31 deletions
|
|
@ -1030,17 +1030,6 @@ var GlodaDatastore = {
|
||||||
|
|
||||||
var dbConnection;
|
var dbConnection;
|
||||||
|
|
||||||
// Report about the size of the database through telemetry (if there's a
|
|
||||||
// database, naturally).
|
|
||||||
if (dbFile.exists()) {
|
|
||||||
try {
|
|
||||||
let h = Services.telemetry.getHistogramById("THUNDERBIRD_GLODA_SIZE_MB");
|
|
||||||
h.add(dbFile.fileSize/1048576);
|
|
||||||
} catch (e) {
|
|
||||||
this._log.warn("Couldn't report telemetry", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the file if it does not exist
|
// Create the file if it does not exist
|
||||||
if (!dbFile.exists()) {
|
if (!dbFile.exists()) {
|
||||||
this._log.debug("Creating database because it doesn't exist.");
|
this._log.debug("Creating database because it doesn't exist.");
|
||||||
|
|
|
||||||
|
|
@ -1460,7 +1460,6 @@ var GlodaMsgIndexer = {
|
||||||
yield aCallbackHandle.pushAndGo(
|
yield aCallbackHandle.pushAndGo(
|
||||||
this._indexMessage(msgHdr, aCallbackHandle),
|
this._indexMessage(msgHdr, aCallbackHandle),
|
||||||
{what: "indexMessage", msgHdr: msgHdr});
|
{what: "indexMessage", msgHdr: msgHdr});
|
||||||
GlodaIndexer._indexedMessageCount++;
|
|
||||||
if (logDebug)
|
if (logDebug)
|
||||||
this._log.debug("<<< back from _indexMessage");
|
this._log.debug("<<< back from _indexMessage");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1006,10 +1006,6 @@ var GlodaIndexer = {
|
||||||
// make ourselves less responsive by drawing out the period of time we
|
// make ourselves less responsive by drawing out the period of time we
|
||||||
// are dominating the main thread.
|
// are dominating the main thread.
|
||||||
this._perfIndexStopwatch.start();
|
this._perfIndexStopwatch.start();
|
||||||
// For telemetry purposes, we want to know how many messages we've been
|
|
||||||
// processing during that batch, and how long it took, pauses included.
|
|
||||||
let t0 = Date.now();
|
|
||||||
this._indexedMessageCount = 0;
|
|
||||||
batchCount = 0;
|
batchCount = 0;
|
||||||
while (batchCount < this._indexTokens) {
|
while (batchCount < this._indexTokens) {
|
||||||
if ((this._callbackHandle.activeIterator === null) &&
|
if ((this._callbackHandle.activeIterator === null) &&
|
||||||
|
|
@ -1150,21 +1146,6 @@ var GlodaIndexer = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// All pauses have been taken, how effective were we? Report!
|
|
||||||
// XXX: there's possibly a lot of fluctuation since we go through here
|
|
||||||
// every 5 messages or even less
|
|
||||||
if (this._indexedMessageCount > 0) {
|
|
||||||
let delta = (Date.now() - t0)/1000; // in seconds
|
|
||||||
let v = Math.round(this._indexedMessageCount/delta);
|
|
||||||
try {
|
|
||||||
let h = Services.telemetry
|
|
||||||
.getHistogramById("THUNDERBIRD_INDEXING_RATE_MSG_PER_S");
|
|
||||||
h.add(v);
|
|
||||||
} catch (e) {
|
|
||||||
this._log.warn("Couldn't report telemetry", e, v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (batchCount > 0) {
|
if (batchCount > 0) {
|
||||||
let totalTime = this._perfIndexStopwatch.realTimeSeconds * 1000;
|
let totalTime = this._perfIndexStopwatch.realTimeSeconds * 1000;
|
||||||
let timePerToken = totalTime / batchCount;
|
let timePerToken = totalTime / batchCount;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue