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

Issue 1005873011: Only record the execution time during startup. (Closed)

Created:
5 years, 9 months ago by yao
Modified:
5 years, 8 months ago
Reviewers:
rkaplow, jwd, sky
CC:
chromium-reviews, browser-components-watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only record the execution time during startup. Also record the delta size between cached and up-to-date top sites to a histogram. BUG=223430 Committed: https://crrev.com/a96dcd5baf3ff6cd28dbf002cc22b6c794afa389 Cr-Commit-Position: refs/heads/master@{#325656}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Record time & delta size at startup, address comments. #

Patch Set 3 : Rebase #

Total comments: 7

Patch Set 4 : Address comments. #

Total comments: 6

Patch Set 5 : Address comments. #

Total comments: 8

Patch Set 6 : Address comments. #

Patch Set 7 : Rebase #

Patch Set 8 : Use a static member to make sure the histogram is recorded only once. #

Total comments: 1

Patch Set 9 : Move the static to TopSitesImpl #

Total comments: 4

Patch Set 10 : Rebase #

Patch Set 11 : Update the histogram name. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -18 lines) Patch
M chrome/browser/history/top_sites_impl.h View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -1 line 0 comments Download
M chrome/browser/history/top_sites_impl.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +30 lines, -7 lines 0 comments Download
M chrome/browser/history/top_sites_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M components/history/core/browser/top_sites_backend.h View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -2 lines 0 comments Download
M components/history/core/browser/top_sites_backend.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -7 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (9 generated)
yao
PTAL, thanks.
5 years, 9 months ago (2015-03-25 21:06:52 UTC) #2
yao
+jwd for review as well, Thanks.
5 years, 9 months ago (2015-03-26 14:54:52 UTC) #4
rkaplow
sorry for slow review. https://codereview.chromium.org/1005873011/diff/1/chrome/browser/history/top_sites_impl.h File chrome/browser/history/top_sites_impl.h (right): https://codereview.chromium.org/1005873011/diff/1/chrome/browser/history/top_sites_impl.h#newcode198 chrome/browser/history/top_sites_impl.h:198: // The bool param is ...
5 years, 9 months ago (2015-03-27 02:33:29 UTC) #5
yao
I changed how the histogram is recorded, after some discution with people. Now we only ...
5 years, 9 months ago (2015-03-27 18:39:46 UTC) #7
jwd
https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc#newcode884 chrome/browser/history/top_sites_impl.cc:884: void TopSitesImpl::OnGotMostVisitedThumbnails( I'm a bit concerned that this *could* ...
5 years, 8 months ago (2015-03-30 16:06:48 UTC) #8
yao
https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc#newcode884 chrome/browser/history/top_sites_impl.cc:884: void TopSitesImpl::OnGotMostVisitedThumbnails( On 2015/03/30 16:06:47, Jesse Doherty wrote: > ...
5 years, 8 months ago (2015-03-30 22:16:18 UTC) #9
yao
https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc#newcode884 chrome/browser/history/top_sites_impl.cc:884: void TopSitesImpl::OnGotMostVisitedThumbnails( On 2015/03/30 16:06:47, Jesse Doherty wrote: > ...
5 years, 8 months ago (2015-03-30 22:18:35 UTC) #10
jwd
lgtm https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/60001/chrome/browser/history/top_sites_impl.cc#newcode884 chrome/browser/history/top_sites_impl.cc:884: void TopSitesImpl::OnGotMostVisitedThumbnails( On 2015/03/30 22:18:35, yao wrote: > ...
5 years, 8 months ago (2015-03-31 19:26:17 UTC) #11
yao
Hi Scott, Could you an owner's review? Thanks? Also, Jesse is a bit worried about ...
5 years, 8 months ago (2015-03-31 19:41:35 UTC) #13
sky
On 2015/03/31 19:41:35, yao wrote: > Hi Scott, > > Could you an owner's review? ...
5 years, 8 months ago (2015-03-31 23:56:26 UTC) #14
sky
On 2015/03/31 23:56:26, sky wrote: > On 2015/03/31 19:41:35, yao wrote: > > Hi Scott, ...
5 years, 8 months ago (2015-03-31 23:56:51 UTC) #15
sky
https://codereview.chromium.org/1005873011/diff/80001/chrome/browser/history/top_sites_impl.h File chrome/browser/history/top_sites_impl.h (right): https://codereview.chromium.org/1005873011/diff/80001/chrome/browser/history/top_sites_impl.h#newcode201 chrome/browser/history/top_sites_impl.h:201: void SetTopSites(const MostVisitedURLList& new_top_sites, bool startup); Please use an ...
5 years, 8 months ago (2015-03-31 23:58:49 UTC) #16
yao
https://codereview.chromium.org/1005873011/diff/80001/chrome/browser/history/top_sites_impl.h File chrome/browser/history/top_sites_impl.h (right): https://codereview.chromium.org/1005873011/diff/80001/chrome/browser/history/top_sites_impl.h#newcode201 chrome/browser/history/top_sites_impl.h:201: void SetTopSites(const MostVisitedURLList& new_top_sites, bool startup); On 2015/03/31 23:58:49, ...
5 years, 8 months ago (2015-04-01 21:43:00 UTC) #18
sky
https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc#newcode776 chrome/browser/history/top_sites_impl.cc:776: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); The name seems to indicate you want ...
5 years, 8 months ago (2015-04-01 22:51:48 UTC) #19
yao
https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc#newcode776 chrome/browser/history/top_sites_impl.cc:776: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); On 2015/04/01 22:51:48, sky wrote: > The ...
5 years, 8 months ago (2015-04-02 17:20:31 UTC) #20
sky
https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc#newcode776 chrome/browser/history/top_sites_impl.cc:776: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); On 2015/04/02 17:20:31, yao wrote: > On ...
5 years, 8 months ago (2015-04-02 18:22:18 UTC) #21
yao
https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc#newcode776 chrome/browser/history/top_sites_impl.cc:776: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); On 2015/04/02 18:22:18, sky wrote: > On ...
5 years, 8 months ago (2015-04-02 19:37:30 UTC) #22
sky
Exactly. On Thu, Apr 2, 2015 at 12:37 PM, <yiyaoliu@chromium.org> wrote: > > https://codereview.chromium.org/1005873011/diff/120001/chrome/browser/history/top_sites_impl.cc > ...
5 years, 8 months ago (2015-04-02 23:23:00 UTC) #23
yao
I thought static is usually not preferred in Chromium code base, but apparently you know ...
5 years, 8 months ago (2015-04-07 14:42:30 UTC) #24
yao
On 2015/04/07 14:42:30, yao wrote: > I thought static is usually not preferred in Chromium ...
5 years, 8 months ago (2015-04-08 18:50:15 UTC) #25
sky
I'm not sure what makes you say statics aren't allowed. They can make testing challenging, ...
5 years, 8 months ago (2015-04-09 15:32:43 UTC) #26
yao
Added a static member. Sorry for the delay.
5 years, 8 months ago (2015-04-16 14:22:46 UTC) #29
sky
https://codereview.chromium.org/1005873011/diff/220001/components/history/core/browser/top_sites_backend.h File components/history/core/browser/top_sites_backend.h (right): https://codereview.chromium.org/1005873011/diff/220001/components/history/core/browser/top_sites_backend.h#newcode63 components/history/core/browser/top_sites_backend.h:63: static void IncraseHistogramRecordingStatus(); Increase Why does this need to ...
5 years, 8 months ago (2015-04-16 16:05:11 UTC) #30
yao
Hi Scott, I'm afraid this static member method won't work. Let me name TopSitesImpl::SetTopSites as ...
5 years, 8 months ago (2015-04-16 17:48:08 UTC) #31
sky
Don't you want to only log the histogram the first time CALL_LOCATION_FROM_ON_GOT_MOST_VISITED_THUMBNAILS is supplied? On ...
5 years, 8 months ago (2015-04-16 19:12:54 UTC) #32
chromium-reviews
Yes, but I don't see how that makes things different. CALL_LOCATION_FROM_ON_GOT_MOST_VISITED_THUMBNAILS is supplied once whenever ...
5 years, 8 months ago (2015-04-16 19:19:39 UTC) #33
yao
Updated as per offline discussion. Thanks!
5 years, 8 months ago (2015-04-16 23:32:58 UTC) #34
sky
https://codereview.chromium.org/1005873011/diff/240001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/240001/chrome/browser/history/top_sites_impl.cc#newcode780 chrome/browser/history/top_sites_impl.cc:780: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); Should this be named differently? This isn't ...
5 years, 8 months ago (2015-04-17 15:07:02 UTC) #35
yao
https://codereview.chromium.org/1005873011/diff/240001/chrome/browser/history/top_sites_impl.cc File chrome/browser/history/top_sites_impl.cc (right): https://codereview.chromium.org/1005873011/diff/240001/chrome/browser/history/top_sites_impl.cc#newcode780 chrome/browser/history/top_sites_impl.cc:780: "History.UpdateTopSitesOnDBThread_Startup_DeltaSize", delta_size); On 2015/04/17 15:07:02, sky wrote: > Should ...
5 years, 8 months ago (2015-04-17 15:42:51 UTC) #36
sky
LGTM
5 years, 8 months ago (2015-04-17 15:44:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1005873011/280001
5 years, 8 months ago (2015-04-17 16:19:08 UTC) #40
commit-bot: I haz the power
Committed patchset #11 (id:280001)
5 years, 8 months ago (2015-04-17 17:08:06 UTC) #41
commit-bot: I haz the power
5 years, 8 months ago (2015-04-17 17:09:01 UTC) #42
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/a96dcd5baf3ff6cd28dbf002cc22b6c794afa389
Cr-Commit-Position: refs/heads/master@{#325656}

Powered by Google App Engine
This is Rietveld 408576698