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