Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java

Issue 1736203002: [Contextual Search] Add metrics for Resolve and View timing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated some method names. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
index f10f973bee79645bda12d96c1c4437adab6456c4..c3702b33ae1ae461240b4f748225e61180e82f7e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
@@ -706,6 +706,28 @@ public class ContextualSearchUma {
}
/**
+ * Logs the duration from starting a search until the Search Term is Resolved.
Theresa 2016/02/29 19:42:44 Capitalization for some words is inconsistent betw
Donn Denman 2016/03/01 21:18:07 Thanks for noticing this inconsistency. I think w
Theresa 2016/03/01 21:48:57 sg :)
+ * @param durationMs The duration to record.
+ */
+ public static void logSearchTermResolutionDuration(long durationMs) {
+ RecordHistogram.recordMediumTimesHistogram(
+ "Search.ContextualSearchResolutionDuration", durationMs, TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Logs the duration from starting a prefetched search until the panel navigates to the results
+ * and they start becoming viewable. Should be called only for searches that are prefetched.
Theresa 2016/02/29 19:42:44 This docstring is really clear!
Donn Denman 2016/03/01 21:18:08 Acknowledged.
+ * @param durationMs The duration to record.
+ * @param didResolve Whether a Search Term Resolution was required as part of the loading.
+ */
+ public static void logPrefetchedSearchNavigatedDuration(long durationMs, boolean didResolve) {
+ String histogramName = didResolve ? "Search.ContextualSearchResolvedSearchDuration"
+ : "Search.ContextualSearchLiteralSearchDuration";
+ RecordHistogram.recordMediumTimesHistogram(
+ histogramName, durationMs, TimeUnit.MILLISECONDS);
+ }
+
+ /**
* Logs whether the promo was seen.
* Logs multiple histograms, with and without the original triggering gesture.
* @param wasPanelSeen Whether the panel was seen.

Powered by Google App Engine
This is Rietveld 408576698