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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java

Issue 2857333002: [TTS] Write initial Tap-features to Ranker. (Closed)
Patch Set: Added logging of the CS-model URL and updated console-logging output. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import java.net.URL;
8
7 /** 9 /**
8 * An interface for logging to UMA via Ranker. 10 * An interface for logging to UMA via Ranker.
9 */ 11 */
10 public interface ContextualSearchRankerLogger { 12 public interface ContextualSearchRankerLogger {
11 enum Feature { 13 enum Feature {
12 UNKNOWN, 14 UNKNOWN,
13 // Outcome labels: 15 // Outcome labels:
14 OUTCOME_WAS_PANEL_OPENED, 16 OUTCOME_WAS_PANEL_OPENED,
15 OUTCOME_WAS_QUICK_ACTION_CLICKED, 17 OUTCOME_WAS_QUICK_ACTION_CLICKED,
16 OUTCOME_WAS_QUICK_ANSWER_SEEN, 18 OUTCOME_WAS_QUICK_ANSWER_SEEN,
17 // Features: 19 // Features:
18 DURATION_AFTER_SCROLL_MS, 20 DURATION_AFTER_SCROLL_MS,
19 DURATION_BEFORE_SCROLL_MS, 21 DURATION_BEFORE_SCROLL_MS,
20 SCREEN_TOP_DPS, 22 SCREEN_TOP_DPS,
21 WAS_SCREEN_BOTTOM, 23 WAS_SCREEN_BOTTOM,
22 // User usage features: 24 // User usage features:
23 PREVIOUS_WEEK_IMPRESSIONS_COUNT, 25 PREVIOUS_WEEK_IMPRESSIONS_COUNT,
24 PREVIOUS_WEEK_CTR_PERCENT, 26 PREVIOUS_WEEK_CTR_PERCENT,
25 PREVIOUS_28DAY_IMPRESSIONS_COUNT, 27 PREVIOUS_28DAY_IMPRESSIONS_COUNT,
26 PREVIOUS_28DAY_CTR_PERCENT 28 PREVIOUS_28DAY_CTR_PERCENT
27 } 29 }
28 30
29 /** 31 /**
32 * Sets the URL for the page.
33 * @param basePageUrl The URL of the base page to log with Ranker.
34 */
35 void setBasePageUrl(URL basePageUrl);
36
37 /**
30 * Logs a particular key/value pair. 38 * Logs a particular key/value pair.
31 * @param feature The feature to log. 39 * @param feature The feature to log.
32 * @param value The value to log, which is associated with the given key. 40 * @param value The value to log, which is associated with the given key.
33 */ 41 */
34 void log(Feature feature, Object value); 42 void log(Feature feature, Object value);
35 43
36 /** 44 /**
37 * Logs the final outcome value that indicates the ML label. 45 * Logs the final outcome value that indicates the ML label.
38 * @param value The outcome label value. 46 * @param value The outcome label value.
39 */ 47 */
40 void logOutcome(Object value); 48 void logOutcome(Object value);
41 49
42 /** 50 /**
43 * Writes all the accumulated log entries and resets the logger so that futu re log calls 51 * Writes all the accumulated log entries and resets the logger so that futu re log calls
44 * accumulate into a new record. 52 * accumulate into a new record.
45 */ 53 */
46 void writeLogAndReset(); 54 void writeLogAndReset();
47 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698