mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-03 01:29:38 +00:00
#334: remove telemetry from places and autocomplete
This commit is contained in:
parent
a05b152eef
commit
127ef91c91
|
@ -674,6 +674,7 @@ AsyncFetchAndSetIconForPage::OnStopRequest(nsIRequest* aRequest,
|
||||||
|
|
||||||
mIcon.expiration = GetExpirationTimeFromChannel(channel);
|
mIcon.expiration = GetExpirationTimeFromChannel(channel);
|
||||||
|
|
||||||
|
#if(0)
|
||||||
// Telemetry probes to measure the favicon file sizes for each different file type.
|
// Telemetry probes to measure the favicon file sizes for each different file type.
|
||||||
// This allow us to measure common file sizes while also observing each type popularity.
|
// This allow us to measure common file sizes while also observing each type popularity.
|
||||||
if (mIcon.mimeType.EqualsLiteral("image/png")) {
|
if (mIcon.mimeType.EqualsLiteral("image/png")) {
|
||||||
|
@ -700,6 +701,7 @@ AsyncFetchAndSetIconForPage::OnStopRequest(nsIRequest* aRequest,
|
||||||
else {
|
else {
|
||||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_OTHER_SIZES, mIcon.data.Length());
|
mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_OTHER_SIZES, mIcon.data.Length());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rv = OptimizeIconSize(mIcon, favicons);
|
rv = OptimizeIconSize(mIcon, favicons);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
|
@ -55,11 +55,13 @@ this.PlacesDBUtils = {
|
||||||
else {
|
else {
|
||||||
// All tasks have been completed.
|
// All tasks have been completed.
|
||||||
// Telemetry the time it took for maintenance, if a start time exists.
|
// Telemetry the time it took for maintenance, if a start time exists.
|
||||||
|
/*
|
||||||
if (aTasks._telemetryStart) {
|
if (aTasks._telemetryStart) {
|
||||||
Services.telemetry.getHistogramById("PLACES_IDLE_MAINTENANCE_TIME_MS")
|
Services.telemetry.getHistogramById("PLACES_IDLE_MAINTENANCE_TIME_MS")
|
||||||
.add(Date.now() - aTasks._telemetryStart);
|
.add(Date.now() - aTasks._telemetryStart);
|
||||||
aTasks._telemetryStart = 0;
|
aTasks._telemetryStart = 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (aTasks.callback) {
|
if (aTasks.callback) {
|
||||||
let scope = aTasks.scope || Cu.getGlobalForObject(aTasks.callback);
|
let scope = aTasks.scope || Cu.getGlobalForObject(aTasks.callback);
|
||||||
|
@ -92,7 +94,7 @@ this.PlacesDBUtils = {
|
||||||
, this.checkCoherence
|
, this.checkCoherence
|
||||||
, this._refreshUI
|
, this._refreshUI
|
||||||
]);
|
]);
|
||||||
tasks._telemetryStart = Date.now();
|
//tasks._telemetryStart = Date.now();
|
||||||
tasks.callback = function() {
|
tasks.callback = function() {
|
||||||
Services.prefs.setIntPref("places.database.lastMaintenance",
|
Services.prefs.setIntPref("places.database.lastMaintenance",
|
||||||
parseInt(Date.now() / 1000));
|
parseInt(Date.now() / 1000));
|
||||||
|
@ -870,6 +872,7 @@ this.PlacesDBUtils = {
|
||||||
telemetry: function PDBU_telemetry(aTasks, aHealthReportCallback=null)
|
telemetry: function PDBU_telemetry(aTasks, aHealthReportCallback=null)
|
||||||
{
|
{
|
||||||
let tasks = new Tasks(aTasks);
|
let tasks = new Tasks(aTasks);
|
||||||
|
/*
|
||||||
|
|
||||||
let isTelemetry = !aHealthReportCallback;
|
let isTelemetry = !aHealthReportCallback;
|
||||||
|
|
||||||
|
@ -948,7 +951,7 @@ this.PlacesDBUtils = {
|
||||||
},
|
},
|
||||||
|
|
||||||
{ histogram: "PLACES_DATABASE_PAGESIZE_B",
|
{ histogram: "PLACES_DATABASE_PAGESIZE_B",
|
||||||
query: "PRAGMA page_size /* PlacesDBUtils.jsm PAGESIZE_B */" },
|
query: "PRAGMA page_size" },
|
||||||
|
|
||||||
{ histogram: "PLACES_DATABASE_SIZE_PER_PAGE_B",
|
{ histogram: "PLACES_DATABASE_SIZE_PER_PAGE_B",
|
||||||
query: "PRAGMA page_count",
|
query: "PRAGMA page_count",
|
||||||
|
@ -1053,6 +1056,7 @@ this.PlacesDBUtils = {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
PlacesDBUtils._executeTasks(tasks);
|
PlacesDBUtils._executeTasks(tasks);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,10 @@ Cu.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||||
"resource://gre/modules/PlacesUtils.jsm");
|
"resource://gre/modules/PlacesUtils.jsm");
|
||||||
|
/*
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
"resource://gre/modules/TelemetryStopwatch.jsm");
|
||||||
|
*/
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||||
"resource://gre/modules/NetUtil.jsm");
|
"resource://gre/modules/NetUtil.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||||
|
@ -859,9 +861,11 @@ Search.prototype = {
|
||||||
if (!this.pending)
|
if (!this.pending)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
TelemetryStopwatch.start(TELEMETRY_1ST_RESULT, this);
|
TelemetryStopwatch.start(TELEMETRY_1ST_RESULT, this);
|
||||||
if (this._searchString)
|
if (this._searchString)
|
||||||
TelemetryStopwatch.start(TELEMETRY_6_FIRST_RESULTS, this);
|
TelemetryStopwatch.start(TELEMETRY_6_FIRST_RESULTS, this);
|
||||||
|
*/
|
||||||
|
|
||||||
// Since we call the synchronous parseSubmissionURL function later, we must
|
// Since we call the synchronous parseSubmissionURL function later, we must
|
||||||
// wait for the initialization of PlacesSearchAutocompleteProvider first.
|
// wait for the initialization of PlacesSearchAutocompleteProvider first.
|
||||||
|
@ -1339,7 +1343,7 @@ Search.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_onResultRow: function (row) {
|
_onResultRow: function (row) {
|
||||||
TelemetryStopwatch.finish(TELEMETRY_1ST_RESULT, this);
|
//TelemetryStopwatch.finish(TELEMETRY_1ST_RESULT, this);
|
||||||
let queryType = row.getResultByIndex(QUERYINDEX_QUERYTYPE);
|
let queryType = row.getResultByIndex(QUERYINDEX_QUERYTYPE);
|
||||||
let match;
|
let match;
|
||||||
switch (queryType) {
|
switch (queryType) {
|
||||||
|
@ -1430,8 +1434,10 @@ Search.prototype = {
|
||||||
match.style,
|
match.style,
|
||||||
match.finalCompleteValue);
|
match.finalCompleteValue);
|
||||||
|
|
||||||
|
/*
|
||||||
if (this._result.matchCount == 6)
|
if (this._result.matchCount == 6)
|
||||||
TelemetryStopwatch.finish(TELEMETRY_6_FIRST_RESULTS, this);
|
TelemetryStopwatch.finish(TELEMETRY_6_FIRST_RESULTS, this);
|
||||||
|
*/
|
||||||
|
|
||||||
this.notifyResults(true);
|
this.notifyResults(true);
|
||||||
},
|
},
|
||||||
|
@ -1939,8 +1945,10 @@ UnifiedComplete.prototype = {
|
||||||
* results or not.
|
* results or not.
|
||||||
*/
|
*/
|
||||||
finishSearch: function (notify=false) {
|
finishSearch: function (notify=false) {
|
||||||
|
/*
|
||||||
TelemetryStopwatch.cancel(TELEMETRY_1ST_RESULT, this);
|
TelemetryStopwatch.cancel(TELEMETRY_1ST_RESULT, this);
|
||||||
TelemetryStopwatch.cancel(TELEMETRY_6_FIRST_RESULTS, this);
|
TelemetryStopwatch.cancel(TELEMETRY_6_FIRST_RESULTS, this);
|
||||||
|
*/
|
||||||
// Clear state now to avoid race conditions, see below.
|
// Clear state now to avoid race conditions, see below.
|
||||||
let search = this._currentSearch;
|
let search = this._currentSearch;
|
||||||
this._lastLowResultsSearchSuggestion = search._lastLowResultsSearchSuggestion;
|
this._lastLowResultsSearchSuggestion = search._lastLowResultsSearchSuggestion;
|
||||||
|
|
|
@ -8,8 +8,10 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||||
"resource://gre/modules/PlacesUtils.jsm");
|
"resource://gre/modules/PlacesUtils.jsm");
|
||||||
|
/*
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
"resource://gre/modules/TelemetryStopwatch.jsm");
|
||||||
|
*/
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||||
"resource://gre/modules/NetUtil.jsm");
|
"resource://gre/modules/NetUtil.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||||
|
@ -1525,7 +1527,7 @@ urlInlineComplete.prototype = {
|
||||||
let query = this._hostQuery;
|
let query = this._hostQuery;
|
||||||
query.params.search_string = this._currentSearchString.toLowerCase();
|
query.params.search_string = this._currentSearchString.toLowerCase();
|
||||||
// This is just to measure the delay to reach the UI, not the query time.
|
// This is just to measure the delay to reach the UI, not the query time.
|
||||||
TelemetryStopwatch.start(DOMAIN_QUERY_TELEMETRY);
|
//TelemetryStopwatch.start(DOMAIN_QUERY_TELEMETRY);
|
||||||
let wrapper = new AutoCompleteStatementCallbackWrapper(this, {
|
let wrapper = new AutoCompleteStatementCallbackWrapper(this, {
|
||||||
handleResult: aResultSet => {
|
handleResult: aResultSet => {
|
||||||
if (this._pendingSearch != pendingSearch)
|
if (this._pendingSearch != pendingSearch)
|
||||||
|
@ -1555,7 +1557,7 @@ urlInlineComplete.prototype = {
|
||||||
handleCompletion: aReason => {
|
handleCompletion: aReason => {
|
||||||
if (this._pendingSearch != pendingSearch)
|
if (this._pendingSearch != pendingSearch)
|
||||||
return;
|
return;
|
||||||
TelemetryStopwatch.finish(DOMAIN_QUERY_TELEMETRY);
|
//TelemetryStopwatch.finish(DOMAIN_QUERY_TELEMETRY);
|
||||||
this._finishSearch();
|
this._finishSearch();
|
||||||
}
|
}
|
||||||
}, this._db);
|
}, this._db);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user