 Chromium Code Reviews
 Chromium Code Reviews Issue 1736203002:
  [Contextual Search] Add metrics for Resolve and View timing  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1736203002:
  [Contextual Search] Add metrics for Resolve and View timing  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java | 
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java | 
| index 7eb80bc2f6c00033246c14935597f2bf0fb9650e..367ab369826a2c282b1c30b136d441a262947561 100644 | 
| --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java | 
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java | 
| @@ -188,6 +188,25 @@ public class ContextualSearchPanelMetrics { | 
| } | 
| /** | 
| + * Called when a search term has been resolved. | 
| + * Currently this just logs time between initiating the search and resolving the search term | 
| + * into the uma metrics. | 
| + */ | 
| + public void onSearchTermResolved() { | 
| + long durationMs = (System.nanoTime() - mSearchViewStartTimeNs) / 1000000; | 
| 
Theresa
2016/02/29 19:42:44
mSearchViewStartTimeNs is set in onSeachPanelFirst
 
Donn Denman
2016/03/01 21:18:07
Wow, that was a big mistake.  Thanks for catching
 | 
| + ContextualSearchUma.logSearchTermResolutionDuration(durationMs); | 
| + } | 
| + | 
| + /** | 
| + * Called when navigation to prefetched search results first become viewable in the panel. | 
| + * Currently this just logs time-till-navigated into the uma metrics. | 
| 
Theresa
2016/02/29 19:42:44
I think the wording on this docstring and "time-ti
 
Donn Denman
2016/03/01 21:18:07
Done.
 | 
| + */ | 
| + public void onPrefetchedSearchNavigated(boolean didResolve) { | 
| + long durationMs = (System.nanoTime() - mSearchViewStartTimeNs) / 1000000; | 
| + ContextualSearchUma.logPrefetchedSearchNavigatedDuration(durationMs, didResolve); | 
| + } | 
| + | 
| + /** | 
| * Records timing information when the search panel has been viewed for the first time. | 
| */ | 
| private void onSearchPanelFirstView() { |