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

Issue 2618893003: 📰 Tweak the suggestion ranks for UMA to handle fetchMore (Closed)

Created:
3 years, 11 months ago by dgn
Modified:
3 years, 11 months ago
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Client] Tweak the suggestion ranks for UMA to handle fetchMore There are 2 types of suggestion positions we report to UMA: - Within a given section: because we were attributing ranks in the incoming bundle, it was not taking into account the suggestions that had been pushed before. This number is now always increasing, so after fetching more suggestions 5 times, the ranks for the 5th bundle can be in the 40 to 49 range. - Global rank: we also now attribute the rank as suggestions are added to the section, and keep track of that number. It would be the position of the suggestion if we kept adding suggestions always at the end of the list rather than grouping them by category. This way for a given NTP, there can be no overlap of global rank or local rank within a section. BUG=675623 Review-Url: https://codereview.chromium.org/2618893003 Cr-Commit-Position: refs/heads/master@{#444354} Committed: https://chromium.googlesource.com/chromium/src/+/5549f302eeb5cc43d3e13435c3826587721ddee8

Patch Set 1 #

Patch Set 2 : Still WIP. Thinking about whether we can simplify more things now #

Patch Set 3 : Compute rank on demand #

Patch Set 4 : try skipping UMA for test #

Total comments: 10

Patch Set 5 : Extract interface #

Patch Set 6 : fix import #

Patch Set 7 : Add tests, add ActionItem support to SuggestionsRanker #

Patch Set 8 : rebase and fix findbugs warning #

Total comments: 4

Patch Set 9 : address comments #

Patch Set 10 : go back with static ranks that always increment #

Patch Set 11 : test behaviour with modified sectionlist #

Patch Set 12 : rebase, doc rename sectionRank to perSectionRank #

Patch Set 13 : Fix action item reported position #

Total comments: 10

Patch Set 14 : rebase, add support to category index to the suggestionsRanker #

Patch Set 15 : address comments #

Total comments: 5

Patch Set 16 : rebase, address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+588 lines, -282 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -45 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +9 lines, -35 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +22 lines, -9 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +9 lines, -15 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +8 lines, -21 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +18 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +6 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +53 lines, -25 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -17 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsMetricsReporter.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRanker.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +52 lines, -57 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -12 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 3 4 5 6 7 8 9 10 11 22 chunks +38 lines, -30 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SectionListTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +190 lines, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 67 (41 generated)
dgn
PTAL. Is that something like that you were thinking about?
3 years, 11 months ago (2017-01-11 12:22:01 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/2618893003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java (right): https://codereview.chromium.org/2618893003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java#newcode332 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java:332: if (sSuggestionsSourceForTests != null) return; Could we instead move ...
3 years, 11 months ago (2017-01-11 13:53:38 UTC) #7
dgn
PTAL https://codereview.chromium.org/2618893003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java (right): https://codereview.chromium.org/2618893003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java#newcode332 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java:332: if (sSuggestionsSourceForTests != null) return; On 2017/01/11 13:53:38, ...
3 years, 11 months ago (2017-01-12 14:29:58 UTC) #18
Bernhard Bauer
LGTM https://codereview.chromium.org/2618893003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java (right): https://codereview.chromium.org/2618893003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java#newcode153 chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java:153: return mSnippetsBridge; Do we have to handle the ...
3 years, 11 months ago (2017-01-13 10:56:07 UTC) #22
dgn
PTAL https://codereview.chromium.org/2618893003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java (right): https://codereview.chromium.org/2618893003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java#newcode153 chrome/android/java/src/org/chromium/chrome/browser/suggestions/ContentSuggestionsActivity.java:153: return mSnippetsBridge; On 2017/01/13 10:56:07, Bernhard Bauer wrote: ...
3 years, 11 months ago (2017-01-13 11:24:05 UTC) #24
Marc Treib
Drive-by comments: - The original reasoning for using the position at-instatiation-time was dismissing: If you ...
3 years, 11 months ago (2017-01-13 13:11:32 UTC) #28
dgn
On 2017/01/13 13:11:32, Marc Treib wrote: > Drive-by comments: > > - The original reasoning ...
3 years, 11 months ago (2017-01-13 16:21:56 UTC) #29
tschumann
On 2017/01/13 16:21:56, dgn wrote: > On 2017/01/13 13:11:32, Marc Treib wrote: > > Drive-by ...
3 years, 11 months ago (2017-01-13 17:35:57 UTC) #30
dgn
On 2017/01/13 17:35:57, tschumann wrote: > On 2017/01/13 16:21:56, dgn wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 17:48:29 UTC) #33
tschumann
On 2017/01/13 17:48:29, dgn wrote: > On 2017/01/13 17:35:57, tschumann wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 18:16:10 UTC) #36
dgn
Rewriting in a more detailed way displaying the rank intervals :) Let's say I have ...
3 years, 11 months ago (2017-01-13 20:39:52 UTC) #39
tschumann
On 2017/01/13 20:39:52, dgn wrote: > Rewriting in a more detailed way displaying the rank ...
3 years, 11 months ago (2017-01-16 09:47:35 UTC) #41
dgn
On 2017/01/16 09:47:35, tschumann wrote: > On 2017/01/13 20:39:52, dgn wrote: > > Rewriting in ...
3 years, 11 months ago (2017-01-16 10:33:16 UTC) #42
Marc Treib
Trying to summarize: - Local ranks are fine. - Nobody can quite figure out what ...
3 years, 11 months ago (2017-01-16 10:54:48 UTC) #43
tschumann
On 2017/01/16 10:54:48, Marc Treib wrote: > Trying to summarize: > - Local ranks are ...
3 years, 11 months ago (2017-01-16 14:08:26 UTC) #44
Marc Treib
On 2017/01/16 14:08:26, tschumann wrote: > On 2017/01/16 10:54:48, Marc Treib wrote: > > Trying ...
3 years, 11 months ago (2017-01-16 14:31:23 UTC) #45
dgn
The current description (included below) fits the implementation proposed in this patch, so I'd like ...
3 years, 11 months ago (2017-01-17 09:55:55 UTC) #46
Bernhard Bauer
Wow, this CL has changed quite a lot :) https://codereview.chromium.org/2618893003/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java (right): https://codereview.chromium.org/2618893003/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java#newcode72 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java:72: ...
3 years, 11 months ago (2017-01-17 17:42:31 UTC) #52
dgn
yes sorry, I moved a few things around to minimize the follow up CL. PTAL ...
3 years, 11 months ago (2017-01-17 18:46:24 UTC) #55
vitaliii
Drive-by comments. https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java (right): https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java#newcode104 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java:104: mSuggestionsRanker.registerCategory(category); I discussed ignoring not shown empty ...
3 years, 11 months ago (2017-01-18 08:46:27 UTC) #56
Bernhard Bauer
lgtm
3 years, 11 months ago (2017-01-18 10:26:22 UTC) #57
dgn
https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java (right): https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java#newcode160 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java:160: int categoryIndex = mSuggestionsRanker.getCategoryRank(suggestion.mCategory); On 2017/01/18 08:46:27, vitaliii (OOO ...
3 years, 11 months ago (2017-01-18 10:47:42 UTC) #58
dgn
Thanks for the reviews! Landing now :) https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRanker.java File chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRanker.java (right): https://codereview.chromium.org/2618893003/diff/280001/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRanker.java#newcode19 chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsRanker.java:19: * elements. ...
3 years, 11 months ago (2017-01-18 13:54:36 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2618893003/300001
3 years, 11 months ago (2017-01-18 13:55:02 UTC) #62
commit-bot: I haz the power
Committed patchset #16 (id:300001) as https://chromium.googlesource.com/chromium/src/+/5549f302eeb5cc43d3e13435c3826587721ddee8
3 years, 11 months ago (2017-01-18 14:56:40 UTC) #65
bikaboy1970
3 years, 11 months ago (2017-01-24 22:24:37 UTC) #67
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698