summaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2015-04-14 00:47:15 +0200
committerPale Moon <git-repo@palemoon.org>2015-04-14 00:47:15 +0200
commit73de3e1564f2a4668fee41176a5845d0dfd970d8 (patch)
treec337271caedbcc7c80f3343b297d3b5dacb63330 /mobile
parent5bc7c2bf0133b33f416b637e031462fa45031a5f (diff)
downloadpalemoon-gre-73de3e1564f2a4668fee41176a5845d0dfd970d8.tar.gz
Remove Telemetry part 14: Fennec histograms
Diffstat (limited to 'mobile')
-rw-r--r--mobile/android/base/BrowserApp.java16
-rw-r--r--mobile/android/base/GeckoApp.java38
-rw-r--r--mobile/android/base/ProfileMigrator.java13
-rw-r--r--mobile/android/base/awesomebar/AllPagesTab.java12
4 files changed, 1 insertions, 78 deletions
diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java
index 2fac6cdf7..b41ffd990 100644
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -97,7 +97,6 @@ abstract public class BrowserApp extends GeckoApp
public static BrowserToolbar mBrowserToolbar;
private AboutHome mAboutHome;
- protected Telemetry.Timer mAboutHomeStartupTimer = null;
private static final int ADDON_MENU_OFFSET = 1000;
private class MenuItemInfo {
@@ -388,8 +387,6 @@ abstract public class BrowserApp extends GeckoApp
@Override
public void onCreate(Bundle savedInstanceState) {
- mAboutHomeStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_ABOUTHOME");
-
super.onCreate(savedInstanceState);
RelativeLayout actionBar = (RelativeLayout) findViewById(R.id.browser_toolbar);
@@ -451,7 +448,6 @@ abstract public class BrowserApp extends GeckoApp
registerEventListener("Feedback:LastUrl");
registerEventListener("Feedback:OpenPlayStore");
registerEventListener("Feedback:MaybeLater");
- registerEventListener("Telemetry:Gather");
registerEventListener("Settings:Show");
registerEventListener("Updater:Launch");
@@ -725,7 +721,6 @@ abstract public class BrowserApp extends GeckoApp
unregisterEventListener("Feedback:LastUrl");
unregisterEventListener("Feedback:OpenPlayStore");
unregisterEventListener("Feedback:MaybeLater");
- unregisterEventListener("Telemetry:Gather");
unregisterEventListener("Settings:Show");
unregisterEventListener("Updater:Launch");
@@ -788,11 +783,6 @@ abstract public class BrowserApp extends GeckoApp
@Override
protected void loadStartupTab(String url) {
- // We aren't showing about:home, so cancel the telemetry timer
- if (url != null || mRestoreMode != RESTORE_NONE) {
- mAboutHomeStartupTimer.cancel();
- }
-
super.loadStartupTab(url);
}
@@ -1092,11 +1082,6 @@ abstract public class BrowserApp extends GeckoApp
DataReportingNotification.checkAndNotifyPolicy(GeckoAppShell.getContext());
}
- } else if (event.equals("Telemetry:Gather")) {
- Telemetry.HistogramAdd("PLACES_PAGES_COUNT", BrowserDB.getCount(getContentResolver(), "history"));
- Telemetry.HistogramAdd("PLACES_BOOKMARKS_COUNT", BrowserDB.getCount(getContentResolver(), "bookmarks"));
- Telemetry.HistogramAdd("FENNEC_FAVICONS_COUNT", BrowserDB.getCount(getContentResolver(), "favicons"));
- Telemetry.HistogramAdd("FENNEC_THUMBNAILS_COUNT", BrowserDB.getCount(getContentResolver(), "thumbnails"));
} else if (event.equals("Reader:ListCountRequest")) {
handleReaderListCountRequest();
} else if (event.equals("Reader:Added")) {
@@ -1867,7 +1852,6 @@ abstract public class BrowserApp extends GeckoApp
@Override
public void onAboutHomeLoadComplete() {
- mAboutHomeStartupTimer.stop();
}
@Override
diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java
index b29c97b9a..a64f2f7d4 100644
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -180,8 +180,6 @@ abstract public class GeckoApp
protected int mRestoreMode = RESTORE_NONE;
protected boolean mInitialized = false;
- private Telemetry.Timer mJavaUiStartupTimer;
- private Telemetry.Timer mGeckoReadyStartupTimer;
private String mPrivateBrowsingSession;
@@ -528,17 +526,7 @@ abstract public class GeckoApp
} else if (event.equals("Reader:GoToReadingList")) {
showReadingList();
} else if (event.equals("Gecko:Ready")) {
- mGeckoReadyStartupTimer.stop();
geckoConnected();
-
- // This method is already running on the background thread, so we
- // know that mHealthRecorder will exist. That doesn't stop us being
- // paranoid.
- // This method is cheap, so don't spawn a new runnable.
- final BrowserHealthRecorder rec = mHealthRecorder;
- if (rec != null) {
- rec.recordGeckoStartupTime(mGeckoReadyStartupTimer.getElapsed());
- }
} else if (event.equals("ToggleChrome:Hide")) {
toggleChrome(false);
} else if (event.equals("ToggleChrome:Show")) {
@@ -1135,10 +1123,6 @@ abstract public class GeckoApp
enableStrictMode();
}
- // The clock starts...now. Better hurry!
- mJavaUiStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_JAVAUI");
- mGeckoReadyStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_GECKOREADY");
-
String args = getIntent().getStringExtra("args");
String profileName = null;
@@ -1197,7 +1181,6 @@ abstract public class GeckoApp
// This happens when the GeckoApp activity is destroyed by Android
// without killing the entire application (see Bug 769269).
mIsRestoringActivity = true;
- Telemetry.HistogramAdd("FENNEC_RESTORING_ACTIVITY", 1);
}
// Fix for Bug 830557 on Tegra boards running Froyo.
@@ -1239,12 +1222,6 @@ abstract public class GeckoApp
boolean wasInBackground =
savedInstanceState.getBoolean(SAVED_STATE_IN_BACKGROUND, false);
- // Don't log OOM-kills if only one activity was destroyed. (For example
- // from "Don't keep activities" on ICS)
- if (!wasInBackground && !mIsRestoringActivity) {
- Telemetry.HistogramAdd("FENNEC_WAS_KILLED", 1);
- }
-
if (savedInstanceState.getBoolean(SAVED_STATE_INTENT_HANDLED, false)) {
Intent thisIntent = getIntent();
// Bug 896992 - This intent has already been handled, clear the intent action.
@@ -1265,9 +1242,6 @@ abstract public class GeckoApp
final SharedPreferences prefs = GeckoApp.getAppSharedPreferences();
SessionInformation previousSession = SessionInformation.fromSharedPrefs(prefs);
- if (previousSession.wasKilled()) {
- Telemetry.HistogramAdd("FENNEC_WAS_KILLED", 1);
- }
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(GeckoApp.PREFS_OOM_EXCEPTION, false);
@@ -1412,8 +1386,6 @@ abstract public class GeckoApp
Tabs.getInstance().notifyListeners(null, Tabs.TabEvents.RESTORED);
}
- Telemetry.HistogramAdd("FENNEC_STARTUP_GECKOAPP_ACTION", startupAction.ordinal());
-
if (!mIsRestoringActivity) {
sGeckoThread = new GeckoThread(intent, passedUri);
ThreadUtils.setGeckoThread(sGeckoThread);
@@ -1503,19 +1475,9 @@ abstract public class GeckoApp
}
});
- // Trigger the completion of the telemetry timer that wraps activity startup,
- // then grab the duration to give to FHR.
- mJavaUiStartupTimer.stop();
- final long javaDuration = mJavaUiStartupTimer.getElapsed();
-
ThreadUtils.getBackgroundHandler().postDelayed(new Runnable() {
@Override
public void run() {
- final BrowserHealthRecorder rec = mHealthRecorder;
- if (rec != null) {
- rec.recordJavaStartupTime(javaDuration);
- }
-
// Sync settings need Gecko to be loaded, so
// no hurry in starting this.
checkMigrateSync();
diff --git a/mobile/android/base/ProfileMigrator.java b/mobile/android/base/ProfileMigrator.java
index 1aa905a87..cd6b905f5 100644
--- a/mobile/android/base/ProfileMigrator.java
+++ b/mobile/android/base/ProfileMigrator.java
@@ -313,16 +313,7 @@ public class ProfileMigrator {
}
public void launchPlaces(File profileDir) {
- boolean timeThisRun = false;
- Telemetry.Timer timer = null;
- // First run, time things
- if (!hasMigrationRun()) {
- timeThisRun = true;
- timer = new Telemetry.Timer("BROWSERPROVIDER_XUL_IMPORT_TIME");
- }
launchPlaces(profileDir, DEFAULT_HISTORY_MIGRATE_COUNT);
- if (timeThisRun)
- timer.stop();
}
public void launchPlaces(File profileDir, int maxEntries) {
@@ -860,8 +851,6 @@ public class ProfileMigrator {
Cursor cursor = db.rawQuery(HISTORY_COUNT_QUERY, null);
cursor.moveToFirst();
int historyCount = cursor.getInt(0);
- Telemetry.HistogramAdd("BROWSERPROVIDER_XUL_IMPORT_HISTORY",
- historyCount);
final String currentTime = Long.toString(System.currentTimeMillis());
final String[] queryParams = new String[] {
@@ -1098,8 +1087,6 @@ public class ProfileMigrator {
// Keep statistics
int bookmarkCount = cursor.getCount();
- Telemetry.HistogramAdd("BROWSERPROVIDER_XUL_IMPORT_BOOKMARKS",
- bookmarkCount);
// Get the extra bookmark attributes
Map<Long, List<AttributePair>> attributes = getBookmarkAttributes(db);
diff --git a/mobile/android/base/awesomebar/AllPagesTab.java b/mobile/android/base/awesomebar/AllPagesTab.java
index f20bb1d67..0604fb86d 100644
--- a/mobile/android/base/awesomebar/AllPagesTab.java
+++ b/mobile/android/base/awesomebar/AllPagesTab.java
@@ -73,7 +73,6 @@ public class AllPagesTab extends AwesomeBarTab implements GeckoEventListener {
private boolean mSuggestionsEnabled;
private AsyncTask<String, Void, ArrayList<String>> mSuggestTask;
private AwesomeBarCursorAdapter mCursorAdapter = null;
- private boolean mTelemetrySent = false;
private LinearLayout mAllPagesView;
private boolean mAnimateSuggestions;
private View mSuggestionsOptInPrompt;
@@ -287,20 +286,11 @@ public class AllPagesTab extends AwesomeBarTab implements GeckoEventListener {
mCursorAdapter.setFilterQueryProvider(new FilterQueryProvider() {
@Override
public Cursor runQuery(CharSequence constraint) {
- long start = SystemClock.uptimeMillis();
-
Cursor c = BrowserDB.filter(getContentResolver(), constraint, MAX_RESULTS);
c.getCount();
postLoadFavicons();
-
- long end = SystemClock.uptimeMillis();
- if (!mTelemetrySent && TextUtils.isEmpty(constraint)) {
- int time = (int)(end - start);
- Telemetry.HistogramAdd("FENNEC_AWESOMEBAR_ALLPAGES_EMPTY_TIME", time);
- mTelemetrySent = true;
- }
-
+
findAutocompleteFor(constraint.toString(), c);
return c;
}