Bug 1324051 - Add highlights histogram telemetry r?grisha
MozReview-Commit-ID: 92m8jYS8b8D
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java
@@ -105,16 +105,17 @@ public class LocalBrowserDB extends Brow
private volatile SuggestedSites mSuggestedSites;
// Constants used when importing history data from legacy browser.
public static final String HISTORY_VISITS_DATE = "date";
public static final String HISTORY_VISITS_COUNT = "visits";
public static final String HISTORY_VISITS_URL = "url";
private static final String TELEMETRY_HISTOGRAM_ACTIVITY_STREAM_TOPSITES = "FENNEC_ACTIVITY_STREAM_TOPSITES_LOADER_TIME_MS";
+ private static final String TELEMETRY_HISTOGRAM_ACTIVITY_STREAM_HIGHLIGHTS = "FENNEC_ACTIVITY_STREAM_HIGHLIGHTS_LOADER_TIME_MS";
private final Uri mBookmarksUriWithProfile;
private final Uri mParentsUriWithProfile;
private final Uri mHistoryUriWithProfile;
private final Uri mHistoryExpireUriWithProfile;
private final Uri mCombinedUriWithProfile;
private final Uri mUpdateHistoryUriWithProfile;
private final Uri mFaviconsUriWithProfile;
@@ -1920,17 +1921,18 @@ public class LocalBrowserDB extends Brow
}
@Override
public CursorLoader getHighlights(Context context, int limit) {
final Uri uri = mHighlightsUriWithProfile.buildUpon()
.appendQueryParameter(BrowserContract.PARAM_LIMIT, String.valueOf(limit))
.build();
- return new CursorLoader(context, uri, null, null, null, null);
+ return new TelemetrisedCursorLoader(context, uri, null, null, null, null,
+ TELEMETRY_HISTOGRAM_ACTIVITY_STREAM_HIGHLIGHTS);
}
@Override
public void blockActivityStreamSite(ContentResolver cr, String url) {
final ContentValues values = new ContentValues();
values.put(ActivityStreamBlocklist.URL, url);
cr.insert(mActivityStreamBlockedUriWithProfile, values);
}
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -6295,16 +6295,27 @@
"low": 10,
"high": 20000,
"n_buckets": 20,
"description": "Time for the Activity Stream home screen Top Sites query to return (ms)",
"alert_emails": ["mobile-frontend@mozilla.com"],
"bug_numbers": [1293790],
"cpp_guard": "ANDROID"
},
+ "FENNEC_ACTIVITY_STREAM_HIGHLIGHTS_LOADER_TIME_MS": {
+ "expires_in_version": "never",
+ "kind": "exponential",
+ "low": 10,
+ "high": 20000,
+ "n_buckets": 20,
+ "description": "Time for the Activity Stream highlights query to return (ms)",
+ "alert_emails": ["mobile-frontend@mozilla.com"],
+ "bug_numbers": [1298786],
+ "cpp_guard": "ANDROID"
+ },
"FENNEC_HOMEPANELS_CUSTOM": {
"expires_in_version": "54",
"kind": "boolean",
"bug_numbers": [1245368],
"description": "Whether the user has customized their homepanels",
"cpp_guard": "ANDROID"
},
"FENNEC_WAS_KILLED": {