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

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)

Created:
3 years, 9 months ago by themblsha
Modified:
3 years, 8 months ago
CC:
chromium-reviews, tfarina, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. Startup.BrowserView.FirstPaint measures how long does it take from browser startup until BrowserView finished the initial paint of all its children. Startup.BrowserView.CompositingEnded measures the time from browser startup to the time the GPU has finished compositing after BrowserView has finished painting its children. At this point the Browser interface is visible on screen. Measures how much time does it take for GPU to actually paint the first time. BUG=704945, 589118 Review-Url: https://codereview.chromium.org/2773973002 Cr-Commit-Position: refs/heads/master@{#466009} Committed: https://chromium.googlesource.com/chromium/src/+/3cfcb7cdbff23b208c96b7da2f42689421c4586e

Patch Set 1 #

Total comments: 12

Patch Set 2 : Add Cocoa "compatibility", fix remarks. #

Total comments: 2

Patch Set 3 : WasNonBrowserUIDisplayed --> WasMainWindowStartupInterrupted, combine the tests, report trace with … #

Total comments: 10

Patch Set 4 : Use more correct place to report timings in Cocoa, fix review remarks. #

Total comments: 20

Patch Set 5 : Rebase on recent Chromium, address sky's remarks. #

Total comments: 2

Patch Set 6 : BrowserView --> BrowserWindow, use factory method for class creation. #

Total comments: 24

Patch Set 7 : Fix gab's and asvitkine's remarks. #

Total comments: 3

Patch Set 8 : Don't use references for base::Time* classes. #

Total comments: 10

Patch Set 9 : Fix asvitkine's remarks. #

Total comments: 6

Patch Set 10 : Fix final review remarks. #

Patch Set 11 : Rebase on top of master. #

Patch Set 12 : Fix compilation on updated master. #

Patch Set 13 : Fix compilation. #

Patch Set 14 : OnCompositingStarted → OnCompositingEnded, as it's been restored and there are no plans to remove… #

Patch Set 15 : Fix compilation error. #

Patch Set 16 : Don't wait for histograms that are not reported during browser_tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -54 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/metrics/browser_window_histogram_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/metrics/browser_window_histogram_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/browser/metrics/first_web_contents_profiler.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
A chrome/browser/metrics/startup_metrics_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M components/startup_metric_utils/browser/startup_metric_utils.h View 1 2 3 4 5 6 7 8 9 2 chunks +26 lines, -15 lines 0 comments Download
M components/startup_metric_utils/browser/startup_metric_utils.cc View 1 2 3 4 5 6 7 8 9 15 chunks +66 lines, -31 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (11 generated)
themblsha
On 2017/03/24 15:12:22, themblsha wrote: > mailto:mblsha@yandex-team.ru changed reviewers: > + mailto:pkasting@chromium.org AFAIK currently there ...
3 years, 9 months ago (2017-03-24 15:15:34 UTC) #3
Alexei Svitkine (slow)
+gab who's a defacto owner of startup metrics Given the change is non-trivial this should ...
3 years, 9 months ago (2017-03-24 15:33:45 UTC) #5
themblsha
On 2017/03/24 15:33:45, Alexei Svitkine (slow) wrote: > +gab who's a defacto owner of startup ...
3 years, 9 months ago (2017-03-24 15:49:03 UTC) #7
gab
How is this different from Startup.FirstWebContents.NonEmptyPaint2?
3 years, 9 months ago (2017-03-24 16:00:57 UTC) #8
themblsha
On 2017/03/24 16:00:57, gab wrote: > How is this different from Startup.FirstWebContents.NonEmptyPaint2? Startup.FirstWebContents.NonEmptyPaint2 measures the ...
3 years, 9 months ago (2017-03-24 16:25:53 UTC) #9
shrike
On 2017/03/24 16:25:53, themblsha wrote: > On 2017/03/24 16:00:57, gab wrote: > > How is ...
3 years, 9 months ago (2017-03-24 17:59:51 UTC) #10
Peter Kasting
https://codereview.chromium.org/2773973002/diff/1/chrome/browser/ui/views/frame/browser_view_histogram_helper.cc File chrome/browser/ui/views/frame/browser_view_histogram_helper.cc (right): https://codereview.chromium.org/2773973002/diff/1/chrome/browser/ui/views/frame/browser_view_histogram_helper.cc#newcode23 chrome/browser/ui/views/frame/browser_view_histogram_helper.cc:23: compositor->AddObserver(this); Nit: Prefer a ScopedObserver to manual add/remove calls. ...
3 years, 9 months ago (2017-03-24 22:39:18 UTC) #11
gab
I expect this metric will not play well with background mode (chrome can be launched ...
3 years, 8 months ago (2017-03-27 15:21:43 UTC) #12
themblsha
There are still some issues that nag me and I want to discuss with someone: ...
3 years, 8 months ago (2017-03-31 14:32:32 UTC) #13
gab
On 2017/03/27 15:21:43, gab wrote: > I expect this metric will not play well with ...
3 years, 8 months ago (2017-04-03 16:18:26 UTC) #14
themblsha
On 2017/04/03 16:18:26, gab wrote: > > Also what's the difference between Startup.BrowserView.FirstPaint and > ...
3 years, 8 months ago (2017-04-04 17:31:33 UTC) #15
gab
On 2017/04/04 17:31:33, themblsha wrote: > On 2017/04/03 16:18:26, gab wrote: > > > Also ...
3 years, 8 months ago (2017-04-04 20:44:08 UTC) #16
gab
https://codereview.chromium.org/2773973002/diff/20001/components/startup_metric_utils/browser/startup_metric_utils.cc File components/startup_metric_utils/browser/startup_metric_utils.cc (right): https://codereview.chromium.org/2773973002/diff/20001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode778 components/startup_metric_utils/browser/startup_metric_utils.cc:778: UMA_HISTOGRAM_WITH_TEMPERATURE(UMA_HISTOGRAM_LONG_TIMES_100, UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE for this one too
3 years, 8 months ago (2017-04-04 20:44:21 UTC) #17
themblsha
On 2017/04/04 20:44:08, gab wrote: > Thanks, still re. previous comments that (1) it won't ...
3 years, 8 months ago (2017-04-05 13:20:08 UTC) #18
themblsha
+tapted Trent, maybe you could advice me on Cocoa Mac drawing: On Views (MacViews included) ...
3 years, 8 months ago (2017-04-06 10:32:48 UTC) #20
gab
Awesome :), startup metrics lgtm w/ comment Please add bug 589118 to CL description as ...
3 years, 8 months ago (2017-04-06 15:30:01 UTC) #21
tapted
On 2017/04/06 10:32:48, themblsha wrote: > +tapted > > Trent, maybe you could advice me ...
3 years, 8 months ago (2017-04-07 00:49:09 UTC) #22
tapted
https://codereview.chromium.org/2773973002/diff/40001/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm File chrome/browser/ui/cocoa/tabs/tab_window_controller.mm (right): https://codereview.chromium.org/2773973002/diff/40001/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm#newcode71 chrome/browser/ui/cocoa/tabs/tab_window_controller.mm:71: std::unique_ptr<BrowserViewHistogramHelper> histogram_helper_; histogramHelper_ (since this is declared between @foo/@end). ...
3 years, 8 months ago (2017-04-07 00:49:34 UTC) #23
themblsha
https://codereview.chromium.org/2773973002/diff/40001/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm File chrome/browser/ui/cocoa/tabs/tab_window_controller.mm (right): https://codereview.chromium.org/2773973002/diff/40001/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm#newcode71 chrome/browser/ui/cocoa/tabs/tab_window_controller.mm:71: std::unique_ptr<BrowserViewHistogramHelper> histogram_helper_; On 2017/04/07 00:49:34, tapted wrote: > histogramHelper_ ...
3 years, 8 months ago (2017-04-10 17:28:19 UTC) #25
tapted
cocoa stuff lgtm
3 years, 8 months ago (2017-04-10 23:26:06 UTC) #26
themblsha
+pkasting +sky +asvitkine Could you please review this? Also histograms.xml is still red even though ...
3 years, 8 months ago (2017-04-11 12:16:31 UTC) #28
sky
https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/background/background_mode_manager.cc File chrome/browser/background/background_mode_manager.cc (right): https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/background/background_mode_manager.cc#newcode721 chrome/browser/background/background_mode_manager.cc:721: startup_metric_utils::SetBackgroundModeEnabled(); How come you don't need a matching End? ...
3 years, 8 months ago (2017-04-11 17:13:36 UTC) #29
Peter Kasting
On 2017/04/11 12:16:31, themblsha wrote: > +pkasting +sky +asvitkine > > Could you please review ...
3 years, 8 months ago (2017-04-11 19:57:39 UTC) #30
Alexei Svitkine (slow)
Will wait for sky@'s comments to be addressed before looking. Happy to review the histograms ...
3 years, 8 months ago (2017-04-11 20:34:32 UTC) #31
themblsha
https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/background/background_mode_manager.cc File chrome/browser/background/background_mode_manager.cc (right): https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/background/background_mode_manager.cc#newcode721 chrome/browser/background/background_mode_manager.cc:721: startup_metric_utils::SetBackgroundModeEnabled(); On 2017/04/11 17:13:36, sky wrote: > How come ...
3 years, 8 months ago (2017-04-12 17:18:29 UTC) #32
sky
https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/ui/browser_view_histogram_helper.h File chrome/browser/ui/browser_view_histogram_helper.h (right): https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/ui/browser_view_histogram_helper.h#newcode15 chrome/browser/ui/browser_view_histogram_helper.h:15: class BrowserViewHistogramHelper : public ui::CompositorObserver { On 2017/04/12 17:18:29, ...
3 years, 8 months ago (2017-04-12 19:34:09 UTC) #33
themblsha
https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/ui/browser_view_histogram_helper.h File chrome/browser/ui/browser_view_histogram_helper.h (right): https://codereview.chromium.org/2773973002/diff/60001/chrome/browser/ui/browser_view_histogram_helper.h#newcode15 chrome/browser/ui/browser_view_histogram_helper.h:15: class BrowserViewHistogramHelper : public ui::CompositorObserver { On 2017/04/12 19:34:08, ...
3 years, 8 months ago (2017-04-17 17:34:49 UTC) #34
gab
Pass on latest changes https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/startup_metrics_browsertest.cc File chrome/browser/metrics/startup_metrics_browsertest.cc (right): https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/startup_metrics_browsertest.cc#newcode19 chrome/browser/metrics/startup_metrics_browsertest.cc:19: }; List all metrics in ...
3 years, 8 months ago (2017-04-18 13:52:15 UTC) #35
Alexei Svitkine (slow)
https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/browser_window_histogram_helper.cc File chrome/browser/metrics/browser_window_histogram_helper.cc (right): https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/browser_window_histogram_helper.cc#newcode17 chrome/browser/metrics/browser_window_histogram_helper.cc:17: // In Cocoa version of Chromium UI is rendered ...
3 years, 8 months ago (2017-04-18 16:01:32 UTC) #36
themblsha
https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/browser_window_histogram_helper.cc File chrome/browser/metrics/browser_window_histogram_helper.cc (right): https://codereview.chromium.org/2773973002/diff/100001/chrome/browser/metrics/browser_window_histogram_helper.cc#newcode17 chrome/browser/metrics/browser_window_histogram_helper.cc:17: // In Cocoa version of Chromium UI is rendered ...
3 years, 8 months ago (2017-04-19 15:06:12 UTC) #37
Alexei Svitkine (slow)
https://codereview.chromium.org/2773973002/diff/100001/components/startup_metric_utils/browser/startup_metric_utils.cc File components/startup_metric_utils/browser/startup_metric_utils.cc (right): https://codereview.chromium.org/2773973002/diff/100001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode781 components/startup_metric_utils/browser/startup_metric_utils.cc:781: void RecordBrowserWindowFirstPaint(const base::TimeTicks& ticks) { On 2017/04/19 15:06:09, themblsha ...
3 years, 8 months ago (2017-04-19 15:26:19 UTC) #38
themblsha
https://codereview.chromium.org/2773973002/diff/100001/components/startup_metric_utils/browser/startup_metric_utils.cc File components/startup_metric_utils/browser/startup_metric_utils.cc (right): https://codereview.chromium.org/2773973002/diff/100001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode781 components/startup_metric_utils/browser/startup_metric_utils.cc:781: void RecordBrowserWindowFirstPaint(const base::TimeTicks& ticks) { On 2017/04/19 15:26:19, Alexei ...
3 years, 8 months ago (2017-04-19 15:47:33 UTC) #39
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/2773973002/diff/140001/chrome/browser/metrics/browser_window_histogram_helper.h File chrome/browser/metrics/browser_window_histogram_helper.h (right): https://codereview.chromium.org/2773973002/diff/140001/chrome/browser/metrics/browser_window_histogram_helper.h#newcode16 chrome/browser/metrics/browser_window_histogram_helper.h:16: // Startup.BrowserWindow.FirstPaint* histograms. Add a sentence ...
3 years, 8 months ago (2017-04-19 16:52:16 UTC) #40
themblsha
asvitkine: Strangely enough histograms.xml is still red even with your LGTM. Is it a bug ...
3 years, 8 months ago (2017-04-19 17:27:41 UTC) #41
Peter Kasting
https://codereview.chromium.org/2773973002/diff/140001/components/startup_metric_utils/browser/startup_metric_utils.cc File components/startup_metric_utils/browser/startup_metric_utils.cc (right): https://codereview.chromium.org/2773973002/diff/140001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode668 components/startup_metric_utils/browser/startup_metric_utils.cc:668: void RecordBrowserWindowDisplay(const base::TimeTicks ticks) { On 2017/04/19 17:27:41, themblsha ...
3 years, 8 months ago (2017-04-19 18:12:12 UTC) #42
Alexei Svitkine (slow)
On 2017/04/19 18:12:12, Peter Kasting wrote: > https://codereview.chromium.org/2773973002/diff/140001/components/startup_metric_utils/browser/startup_metric_utils.cc > File components/startup_metric_utils/browser/startup_metric_utils.cc (right): > > https://codereview.chromium.org/2773973002/diff/140001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode668 ...
3 years, 8 months ago (2017-04-19 18:18:23 UTC) #43
gab
https://codereview.chromium.org/2773973002/diff/120001/chrome/browser/metrics/startup_metrics_browsertest.cc File chrome/browser/metrics/startup_metrics_browsertest.cc (right): https://codereview.chromium.org/2773973002/diff/120001/chrome/browser/metrics/startup_metrics_browsertest.cc#newcode30 chrome/browser/metrics/startup_metrics_browsertest.cc:30: // Currently they're not reported at all during browser_tests. ...
3 years, 8 months ago (2017-04-19 18:45:43 UTC) #44
sky
LGTM with the following change https://codereview.chromium.org/2773973002/diff/160001/chrome/browser/metrics/browser_window_histogram_helper.cc File chrome/browser/metrics/browser_window_histogram_helper.cc (right): https://codereview.chromium.org/2773973002/diff/160001/chrome/browser/metrics/browser_window_histogram_helper.cc#newcode10 chrome/browser/metrics/browser_window_histogram_helper.cc:10: BrowserWindowHistogramHelper::BrowserWindowHistogramHelper( Style guide says ...
3 years, 8 months ago (2017-04-19 20:05:08 UTC) #45
themblsha
Gerrit looks nice! Wonder how it compares to Bitbucket Server which we use locally at ...
3 years, 8 months ago (2017-04-20 10:42:23 UTC) #46
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/2773973002/290001
3 years, 8 months ago (2017-04-20 13:57:30 UTC) #49
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 14:59:56 UTC) #52
Message was sent while issue was closed.
Committed patchset #16 (id:290001) as
https://chromium.googlesource.com/chromium/src/+/3cfcb7cdbff23b208c96b7da2f42...

Powered by Google App Engine
This is Rietveld 408576698