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

Issue 1413533008: Add UMA metric: Startup.BrowserMainToRendererMain. (Closed)

Created:
5 years, 1 month ago by fdoray
Modified:
5 years, 1 month ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, droger+watchlist_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, jam, darin-cc_chromium.org, asvitkine+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add UMA metric: Startup.BrowserMainToRendererMain. This new metric keeps track of the time from BrowserMain() to RendererMain(). Time is recorded by renderer processes when they enter RendererMain(). This time is sent to the browser through an IPC. The browser records the first renderer main entry time that it receives and ignores the others. When the first non-empty paint occurs, the browser computes Startup.BrowserMainToRendererMain (First Renderer Main Entry Time - Browser Main Entry Time) and logs it. We need a renderer->browser IPC because the startup temperature is only known in the browser (we cannot pass this information with a cmd-line flag because it is not known yet when the first renderer is launched). We need to wait until the first non-empty paint to log the metric, because we don't have any guarantee that both the startup temperature and the first renderer main entry time are known before that. BUG=547794 Committed: https://crrev.com/443bd11bc8106bea98a89819b7bb1b35d6e5ddf8 Cr-Commit-Position: refs/heads/master@{#359904}

Patch Set 1 #

Total comments: 19

Patch Set 2 : address comments 3-7 (rename the metric, nits). #

Patch Set 3 : self-review #

Total comments: 5

Patch Set 4 : address comments 12-14 (histogram suffixes) #

Total comments: 2

Patch Set 5 : rebase #

Patch Set 6 : rename gn targets. #

Patch Set 7 : fix compile error. #

Patch Set 8 : fix whitespace error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -29 lines) Patch
M chrome/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/html_viewer/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/startup_metric_utils.gypi View 1 2 3 4 5 6 2 chunks +40 lines, -0 lines 0 comments Download
M components/startup_metric_utils/browser/BUILD.gn View 1 2 3 4 5 2 chunks +28 lines, -1 line 0 comments Download
A + components/startup_metric_utils/browser/DEPS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/startup_metric_utils/browser/OWNERS View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A components/startup_metric_utils/browser/startup_metric_message_filter.h View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A components/startup_metric_utils/browser/startup_metric_message_filter.cc View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
M components/startup_metric_utils/browser/startup_metric_utils.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M components/startup_metric_utils/browser/startup_metric_utils.cc View 1 2 3 4 10 chunks +47 lines, -15 lines 0 comments Download
A + components/startup_metric_utils/common/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
A + components/startup_metric_utils/common/DEPS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/startup_metric_utils/common/startup_metric_message_generator.h View 1 chunk +1 line, -2 lines 0 comments Download
A + components/startup_metric_utils/common/startup_metric_message_generator.cc View 1 chunk +6 lines, -6 lines 0 comments Download
A components/startup_metric_utils/common/startup_metric_messages.h View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 3 chunks +8 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (7 generated)
fdoray
asvitkine@chromium.org: Please review changes in tools/metrics/histograms/histograms.xml ben@chromium.org: Please review changes in chrome/, components/BUILD.gn, components/html_viewer, content/ ...
5 years, 1 month ago (2015-11-06 07:20:21 UTC) #2
Alexei Svitkine (slow)
https://codereview.chromium.org/1413533008/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1413533008/diff/1/tools/metrics/histograms/histograms.xml#newcode44531 tools/metrics/histograms/histograms.xml:44531: + Time from the main() function in chrome.dll to ...
5 years, 1 month ago (2015-11-06 16:21:26 UTC) #3
Alexei Svitkine (slow)
"The browser records the first renderer main entry time that it receives and ignores the ...
5 years, 1 month ago (2015-11-06 16:23:08 UTC) #4
gab
On 2015/11/06 16:23:08, Alexei Svitkine (slow) wrote: > "The browser records the > first renderer ...
5 years, 1 month ago (2015-11-06 17:41:59 UTC) #5
gab
lg https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils.gypi File components/startup_metric_utils.gypi (right): https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils.gypi#newcode12 components/startup_metric_utils.gypi:12: 'target_name': 'startup_metric_utils_browser_utils', I prefer keeping "startup_metric_utils_browser", adding "_utils" ...
5 years, 1 month ago (2015-11-06 18:05:17 UTC) #6
gab
https://codereview.chromium.org/1413533008/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1413533008/diff/1/tools/metrics/histograms/histograms.xml#newcode44531 tools/metrics/histograms/histograms.xml:44531: + Time from the main() function in chrome.dll to ...
5 years, 1 month ago (2015-11-06 18:06:26 UTC) #7
fdoray
gab@ and asvitkine@: I addressed all your comments. asvitkine@chromium.org: Could you take another look at ...
5 years, 1 month ago (2015-11-09 15:53:56 UTC) #9
fdoray
gab@ and asvitkine@: I addressed all your comments. asvitkine@chromium.org: Could you take another look at ...
5 years, 1 month ago (2015-11-09 15:54:56 UTC) #11
gab
https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils/browser/startup_metric_message_filter.h File components/startup_metric_utils/browser/startup_metric_message_filter.h (right): https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils/browser/startup_metric_message_filter.h#newcode17 components/startup_metric_utils/browser/startup_metric_message_filter.h:17: StartupMetricMessageFilter(); On 2015/11/09 15:53:56, fdoray wrote: > On 2015/11/06 ...
5 years, 1 month ago (2015-11-09 16:01:29 UTC) #12
Alexei Svitkine (slow)
https://codereview.chromium.org/1413533008/diff/40001/components/startup_metric_utils/browser/startup_metric_utils.cc File components/startup_metric_utils/browser/startup_metric_utils.cc (right): https://codereview.chromium.org/1413533008/diff/40001/components/startup_metric_utils/browser/startup_metric_utils.cc#newcode305 components/startup_metric_utils/browser/startup_metric_utils.cc:305: UMA_HISTOGRAM_AND_TRACE_WITH_STARTUP_TEMPERATURE( Given that you're using this macro which adds ...
5 years, 1 month ago (2015-11-09 16:06:04 UTC) #13
gab
lgtm w/ comments https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils/common/startup_metric_messages.h File components/startup_metric_utils/common/startup_metric_messages.h (right): https://codereview.chromium.org/1413533008/diff/1/components/startup_metric_utils/common/startup_metric_messages.h#newcode1 components/startup_metric_utils/common/startup_metric_messages.h:1: // Copyright 2015 The Chromium Authors. ...
5 years, 1 month ago (2015-11-09 16:21:36 UTC) #14
fdoray
gab@ and asvitkine@: all done -agl@ +tsepez@: Could you review ipc/ipc_message_start.h and components/startup_metric_utils/common/startup_metric_messages.h? https://codereview.chromium.org/1413533008/diff/40001/components/startup_metric_utils/browser/startup_metric_utils.cc File ...
5 years, 1 month ago (2015-11-09 17:10:17 UTC) #16
Alexei Svitkine (slow)
histograms lgtm
5 years, 1 month ago (2015-11-09 17:32:59 UTC) #17
fdoray
ben@chromium.org: Please review changes in chrome/, components/BUILD.gn, components/html_viewer, content/ agl@chromium.org: Please review changes in ipc/ipc_message_start.h ...
5 years, 1 month ago (2015-11-09 17:51:05 UTC) #18
Tom Sepez
Messages LGTM.
5 years, 1 month ago (2015-11-09 18:09:17 UTC) #19
agl
LGTM for ipc/.
5 years, 1 month ago (2015-11-09 19:17:45 UTC) #21
fdoray
ben@chromium.org: Please review changes in chrome/, components/BUILD.gn, components/html_viewer, content/
5 years, 1 month ago (2015-11-10 21:27:15 UTC) #22
Ben Goodger (Google)
https://codereview.chromium.org/1413533008/diff/60001/components/html_viewer/BUILD.gn File components/html_viewer/BUILD.gn (right): https://codereview.chromium.org/1413533008/diff/60001/components/html_viewer/BUILD.gn#newcode164 components/html_viewer/BUILD.gn:164: "//components/startup_metric_utils/browser:browser", why is this necessary?
5 years, 1 month ago (2015-11-13 20:07:37 UTC) #23
fdoray
ben@: Could you take another look? https://codereview.chromium.org/1413533008/diff/60001/components/html_viewer/BUILD.gn File components/html_viewer/BUILD.gn (right): https://codereview.chromium.org/1413533008/diff/60001/components/html_viewer/BUILD.gn#newcode164 components/html_viewer/BUILD.gn:164: "//components/startup_metric_utils/browser:browser", On 2015/11/13 ...
5 years, 1 month ago (2015-11-13 20:25:22 UTC) #24
Ben Goodger (Google)
On 2015/11/13 20:25:22, fdoray wrote: > ben@: Could you take another look? > > https://codereview.chromium.org/1413533008/diff/60001/components/html_viewer/BUILD.gn ...
5 years, 1 month ago (2015-11-13 22:56:33 UTC) #25
Ben Goodger (Google)
On 2015/11/13 22:56:33, Ben Goodger (Google) wrote: > On 2015/11/13 20:25:22, fdoray wrote: > > ...
5 years, 1 month ago (2015-11-13 22:57:57 UTC) #26
fdoray
ben@: I updated components/startup_metric_utils/browser/BUILD.gn as you recommended. Can you take another look?
5 years, 1 month ago (2015-11-16 14:22:22 UTC) #27
Ben Goodger (Google)
chrome stuff lgtm
5 years, 1 month ago (2015-11-16 19:12:58 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413533008/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413533008/140001
5 years, 1 month ago (2015-11-16 19:13:58 UTC) #31
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 1 month ago (2015-11-16 20:44:34 UTC) #32
commit-bot: I haz the power
5 years, 1 month ago (2015-11-16 20:45:43 UTC) #33
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/443bd11bc8106bea98a89819b7bb1b35d6e5ddf8
Cr-Commit-Position: refs/heads/master@{#359904}

Powered by Google App Engine
This is Rietveld 408576698