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

Issue 1179953005: Add History.TopHostsVisitsByRank UMA metric. (Closed)

Created:
5 years, 6 months ago by twifkak
Modified:
5 years, 5 months ago
Reviewers:
bengr, Mark P, sky
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@is_allowed
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add History.TopHostsVisitsByRank UMA metric. Created in the style of TopSitesVisitsByRank (https://codereview.chromium.org/16517002/), but instead of populating the top hosts map at Init(), where it is potentially user-impacting (blocking other history-needing features, such as autocomplete, from running), it is lazily populated by TopHosts(). Callers of that method should not expect any additional delay due to this addition. Practically speaking, this metric will only report for members of the Precache field trial, as that is the only client of TopHosts, currently. This will only provide information on Android devices, but otherwise is not expected to bias the metric significantly. BUG=499532 Committed: https://crrev.com/cffae42a2d58588ca6cca5f40351b168fcdc10b0 Cr-Commit-Position: refs/heads/master@{#337185}

Patch Set 1 : Add History.TopHostsVisitsByRank and extract HostForTopHosts util function. #

Total comments: 6

Patch Set 2 : Edits per mpearson. #

Total comments: 24

Patch Set 3 : Fix RecordTopHostsMetrics performance problem and add small test. #

Total comments: 2

Patch Set 4 : Add unittest and fix off-by-one error introduced in patch set 3. #

Patch Set 5 : Use HistogramTester to eliminate test brittleness. #

Patch Set 6 : Make History.TopHostsVisitsByRank 0-based. #

Patch Set 7 : Make History.TopHostsVisitsByRank 1-based again. #

Total comments: 8

Patch Set 8 : Case folding and doc tweaks per sky. #

Total comments: 1

Patch Set 9 : Rebase. #

Patch Set 10 : Fix unittest to be 1-based again. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -5 lines) Patch
M components/history/core/browser/history_backend.h View 1 2 3 4 5 6 7 5 chunks +11 lines, -0 lines 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 5 6 5 chunks +24 lines, -1 line 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +49 lines, -0 lines 0 comments Download
M components/history/core/browser/history_database.cc View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M components/history/core/browser/url_utils.h View 1 chunk +4 lines, -0 lines 0 comments Download
M components/history/core/browser/url_utils.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M components/history/core/browser/url_utils_unittest.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (14 generated)
twifkak
mpearson@/jwd@ for tools/metrics/ sky@/sdefresne@ for components/history/
5 years, 6 months ago (2015-06-12 19:32:36 UTC) #2
twifkak
Adding brettw for components/history/.
5 years, 6 months ago (2015-06-12 19:34:59 UTC) #4
Mark P
In the future, I suggest picking reviewers, not picking multiple people to review the same ...
5 years, 6 months ago (2015-06-12 20:09:00 UTC) #5
Mark P
Also, from the changelist description: "Practically speaking, this metric will only report for members of ...
5 years, 6 months ago (2015-06-12 20:12:30 UTC) #6
twifkak
On 2015/06/12 20:09:00, Mark P wrote: > In the future, I suggest picking reviewers, not ...
5 years, 6 months ago (2015-06-12 20:33:17 UTC) #8
twifkak
On 2015/06/12 20:12:30, Mark P wrote: > Also, from the changelist description: > "Practically speaking, ...
5 years, 6 months ago (2015-06-12 20:43:25 UTC) #9
twifkak
https://codereview.chromium.org/1179953005/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/1179953005/diff/1/tools/metrics/histograms/histograms.xml#oldcode12926 tools/metrics/histograms/histograms.xml:12926: -<histogram name="History.TopSitesVisitsByRank" units="rank"> On 2015/06/12 20:08:59, Mark P wrote: ...
5 years, 6 months ago (2015-06-12 20:43:46 UTC) #10
Mark P
https://codereview.chromium.org/1179953005/diff/20001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1179953005/diff/20001/tools/metrics/histograms/histograms.xml#newcode12926 tools/metrics/histograms/histograms.xml:12926: + approximately nightly. Only count the page visit if ...
5 years, 6 months ago (2015-06-12 21:09:54 UTC) #11
bengr
lgtm with nits. https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode93 components/history/core/browser/history_backend.cc:93: const int kMaxTopHostsForMetrics = 50; Is ...
5 years, 6 months ago (2015-06-13 00:21:14 UTC) #12
sky
https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode740 components/history/core/browser/history_backend.cc:740: int host_rank = host_ranks_[HostForTopHosts(url)]; This always results in inserting ...
5 years, 6 months ago (2015-06-15 17:28:17 UTC) #14
twifkak
https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode93 components/history/core/browser/history_backend.cc:93: const int kMaxTopHostsForMetrics = 50; On 2015/06/13 00:21:14, bengr ...
5 years, 6 months ago (2015-06-16 20:25:24 UTC) #15
Mark P
histograms.xml lgtm see minor comments below --mark https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode740 components/history/core/browser/history_backend.cc:740: int host_rank ...
5 years, 6 months ago (2015-06-16 20:54:31 UTC) #16
twifkak
https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode740 components/history/core/browser/history_backend.cc:740: int host_rank = host_ranks_[HostForTopHosts(url)]; On 2015/06/16 20:54:31, Mark P ...
5 years, 6 months ago (2015-06-17 00:05:24 UTC) #17
twifkak
sky and sdefresne: Ping.
5 years, 6 months ago (2015-06-23 22:24:50 UTC) #18
sky
https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1179953005/diff/20001/components/history/core/browser/history_backend.cc#newcode744 components/history/core/browser/history_backend.cc:744: UMA_HISTOGRAM_ENUMERATION("History.TopHostsVisitsByRank", host_rank, On 2015/06/16 20:25:23, twifkak wrote: > On ...
5 years, 5 months ago (2015-06-30 19:17:26 UTC) #20
twifkak
A rebase got mixed in there. My diff lines are: history_backend.h: L842 / R846 history_backend.cc: ...
5 years, 5 months ago (2015-06-30 21:14:43 UTC) #21
sky
On Tue, Jun 30, 2015 at 2:14 PM, <twifkak@chromium.org> wrote: > A rebase got mixed ...
5 years, 5 months ago (2015-06-30 22:19:44 UTC) #22
twifkak
On 2015/06/30 22:19:44, sky wrote: > On Tue, Jun 30, 2015 at 2:14 PM, <mailto:twifkak@chromium.org> ...
5 years, 5 months ago (2015-07-01 16:03:16 UTC) #23
sky
https://codereview.chromium.org/1179953005/diff/120001/components/history/core/browser/history_backend.h File components/history/core/browser/history_backend.h (right): https://codereview.chromium.org/1179953005/diff/120001/components/history/core/browser/history_backend.h#newcode846 components/history/core/browser/history_backend.h:846: // Map from host to index in the TopHosts ...
5 years, 5 months ago (2015-07-01 16:53:33 UTC) #24
twifkak
https://codereview.chromium.org/1179953005/diff/120001/components/history/core/browser/history_backend.h File components/history/core/browser/history_backend.h (right): https://codereview.chromium.org/1179953005/diff/120001/components/history/core/browser/history_backend.h#newcode846 components/history/core/browser/history_backend.h:846: // Map from host to index in the TopHosts ...
5 years, 5 months ago (2015-07-01 19:58:40 UTC) #25
sky
LGTM
5 years, 5 months ago (2015-07-01 20:45:23 UTC) #26
twifkak
On 2015/07/01 20:45:23, sky wrote: > LGTM Thank you for the review!
5 years, 5 months ago (2015-07-01 21:01:14 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179953005/130001
5 years, 5 months ago (2015-07-01 21:02:00 UTC) #30
commit-bot: I haz the power
Exceeded global retry quota
5 years, 5 months ago (2015-07-01 21:32:18 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179953005/170001
5 years, 5 months ago (2015-07-01 22:20:26 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/40197)
5 years, 5 months ago (2015-07-02 00:47:20 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179953005/170001
5 years, 5 months ago (2015-07-02 00:52:40 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/40286)
5 years, 5 months ago (2015-07-02 02:59:08 UTC) #41
twifkak
On 2015/07/02 02:59:08, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 5 months ago (2015-07-02 06:17:23 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179953005/170001
5 years, 5 months ago (2015-07-02 06:17:48 UTC) #44
commit-bot: I haz the power
Committed patchset #10 (id:170001)
5 years, 5 months ago (2015-07-02 07:23:46 UTC) #45
commit-bot: I haz the power
5 years, 5 months ago (2015-07-02 07:24:55 UTC) #46
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cffae42a2d58588ca6cca5f40351b168fcdc10b0
Cr-Commit-Position: refs/heads/master@{#337185}

Powered by Google App Engine
This is Rietveld 408576698