Index: mojo/runner/context.cc |
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc |
index 39d0536973c48d12b19486658aa6ba6f5844bf9e..ef3bf2dfd256dd3a483517d939c548fa57a1ba33 100644 |
--- a/mojo/runner/context.cc |
+++ b/mojo/runner/context.cc |
@@ -14,6 +14,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/scoped_vector.h" |
#include "base/path_service.h" |
+#include "base/process/process_info.h" |
#include "base/run_loop.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_split.h" |
@@ -313,6 +314,15 @@ bool Context::Init() { |
tracing_service_provider_ptr.Pass(), |
shell::GetPermissiveCapabilityFilter(), base::Closure()); |
+ // Record the shell process creation time for performance testing. |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kStatsCollectionController)) { |
+ tracing::StartupPerformanceControllerPtr controller; |
+ application_manager_.ConnectToService(GURL("mojo:tracing"), &controller); |
yzshen1
2015/08/13 15:59:12
Please consider directly obtaining a service provi
msw
2015/08/14 23:20:35
Done.
|
+ const base::Time creation_time = base::CurrentProcessInfo::CreationTime(); |
+ controller->SetShellProcessCreationTime(creation_time.ToInternalValue()); |
+ } |
+ |
InitDevToolsServiceIfNeeded(&application_manager_, command_line); |
return true; |