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

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') | tools/metrics/histograms/histograms.xml » ('J')
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..70501f90eac37acd889ffcdf43cd16e5736f4bc1 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -14,11 +14,13 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
Ilya Sherman 2016/03/07 22:08:32 nit: Do you need both the histogram and the histog
Ken Rockot(use gerrit already) 2016/03/07 22:24:50 Doubtful - I've removed 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 +95,12 @@ int RendererMain(const MainFunctionParams& parameters) {
const base::CommandLine& parsed_command_line = parameters.command_line;
- MojoShellConnectionImpl::Create();
+ {
+ base::ElapsedTimer timer;
+ MojoShellConnectionImpl::Create();
+ LOCAL_HISTOGRAM_TIMES("Mojo.Shell.RenderProcessInitializationTime",
+ timer.Elapsed());
Ilya Sherman 2016/03/07 22:08:32 Are you sure you want a *local* histogram, i.e. on
Ken Rockot(use gerrit already) 2016/03/07 22:24:50 No! Good catch, I wanted an UMA histogram. Fixed.
+ }
#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') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698