summaryrefslogtreecommitdiffstats
path: root/mojo/services
diff options
context:
space:
mode:
authormsw <msw@chromium.org>2015-08-25 20:28:35 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-26 03:29:04 +0000
commit74285dd92212c6fb10cb2efeab96b6ea9bd36669 (patch)
tree6b2982ccc03cd85f4aaa8958d820aa273e10e9d6 /mojo/services
parent4a6e0ae21014c3137cd032df0e4196d8a9c2e1f0 (diff)
downloadchromium_src-74285dd92212c6fb10cb2efeab96b6ea9bd36669.zip
chromium_src-74285dd92212c6fb10cb2efeab96b6ea9bd36669.tar.gz
chromium_src-74285dd92212c6fb10cb2efeab96b6ea9bd36669.tar.bz2
Refine Chrome and Mandoline startup metric measurements.
Add startup_metric_utils helpers to record common metrics. (for FirstWebContentsProfiler, Browser, StatsCollectionController) Record the process creation time in startup_metric_utils. (timing taken from ChromeMainDelegate and mojo::Context) (measure Mandoline shell's process, not mojo:browser's) Also record a shell main entry point via mojo::Context. Record more accurate metrics around the mojo:browser app. Get the message loop start time from BrowserManager's ctor. Get the window display time from BrowserWindow::OnEmbed. Get the 'tab open' time from the end of OnEmbed. BUG=513779 TEST=More accurate measurements of Mandoline startup. No Chrome changes. R=sky@chromium.org,gab@chromium.org Review URL: https://codereview.chromium.org/1305203003 Cr-Commit-Position: refs/heads/master@{#345535}
Diffstat (limited to 'mojo/services')
-rw-r--r--mojo/services/tracing/public/interfaces/tracing.mojom2
-rw-r--r--mojo/services/tracing/tracing_app.cc5
-rw-r--r--mojo/services/tracing/tracing_app.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/mojo/services/tracing/public/interfaces/tracing.mojom b/mojo/services/tracing/public/interfaces/tracing.mojom
index dbf9b3e..935a862 100644
--- a/mojo/services/tracing/public/interfaces/tracing.mojom
+++ b/mojo/services/tracing/public/interfaces/tracing.mojom
@@ -32,6 +32,7 @@ interface TraceCoordinator {
struct StartupPerformanceTimes {
// TODO(msw): Rename to match "BrowserMainEntryTimeAbsolute" metric?
int64 shell_process_creation_time;
+ int64 shell_main_entry_point_time;
int64 browser_message_loop_start_time;
int64 browser_window_display_time;
int64 browser_open_tabs_time;
@@ -45,6 +46,7 @@ struct StartupPerformanceTimes {
interface StartupPerformanceDataCollector {
// These setters may be called many times, only the first time is recorded.
SetShellProcessCreationTime(int64 time);
+ SetShellMainEntryPointTime(int64 time);
SetBrowserMessageLoopStartTime(int64 time);
SetBrowserWindowDisplayTime(int64 time);
SetBrowserOpenTabsTime(int64 time);
diff --git a/mojo/services/tracing/tracing_app.cc b/mojo/services/tracing/tracing_app.cc
index 62b77d8..504ba2c 100644
--- a/mojo/services/tracing/tracing_app.cc
+++ b/mojo/services/tracing/tracing_app.cc
@@ -94,6 +94,11 @@ void TracingApp::SetShellProcessCreationTime(int64 time) {
startup_performance_times_.shell_process_creation_time = time;
}
+void TracingApp::SetShellMainEntryPointTime(int64 time) {
+ if (startup_performance_times_.shell_main_entry_point_time == 0)
+ startup_performance_times_.shell_main_entry_point_time = time;
+}
+
void TracingApp::SetBrowserMessageLoopStartTime(int64 time) {
if (startup_performance_times_.browser_message_loop_start_time == 0)
startup_performance_times_.browser_message_loop_start_time = time;
diff --git a/mojo/services/tracing/tracing_app.h b/mojo/services/tracing/tracing_app.h
index 41a6848..8d0ff2b 100644
--- a/mojo/services/tracing/tracing_app.h
+++ b/mojo/services/tracing/tracing_app.h
@@ -49,6 +49,7 @@ class TracingApp
// StartupPerformanceDataCollector implementation.
void SetShellProcessCreationTime(int64 time) override;
+ void SetShellMainEntryPointTime(int64 time) override;
void SetBrowserMessageLoopStartTime(int64 time) override;
void SetBrowserWindowDisplayTime(int64 time) override;
void SetBrowserOpenTabsTime(int64 time) override;