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

Unified Diff: content/renderer/renderer_main.cc

Issue 1768363002: Add histogram to track Mojo shell / renderer connection init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index b5bf9ae0a51755d8b816994e91fd48eaac7b326d..678e20d5cffe0221ee477d78f9c2baaaa96394b1 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -13,12 +13,13 @@
#include "base/i18n/rtl.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
-#include "base/metrics/histogram.h"
+#include "base/metrics/histogram_macros.h"
#include "base/metrics/statistics_recorder.h"
#include "base/pending_task.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "base/threading/platform_thread.h"
+#include "base/timer/elapsed_timer.h"
#include "base/timer/hi_res_timer_manager.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -93,7 +94,12 @@ int RendererMain(const MainFunctionParams& parameters) {
const base::CommandLine& parsed_command_line = parameters.command_line;
- MojoShellConnectionImpl::Create();
+ {
+ base::ElapsedTimer timer;
+ MojoShellConnectionImpl::Create();
+ UMA_HISTOGRAM_TIMES("Mojo.Shell.RenderProcessInitializationTime",
+ timer.Elapsed());
+ }
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698