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

Unified Diff: content/child/child_thread_impl.cc

Issue 1782133002: Instrument MojoShellConnectionImpl::BindToMessagePipe (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 | content/renderer/renderer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 5ea6c5953080ad1938659e7045465feeac24fcac..2e0dc0de76619e8903ebf78c7481250372956be8 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -18,6 +18,7 @@
#include "base/macros.h"
#include "base/message_loop/timer_slack.h"
#include "base/metrics/field_trial.h"
+#include "base/metrics/histogram_macros.h"
#include "base/process/process.h"
#include "base/process/process_handle.h"
#include "base/single_thread_task_runner.h"
@@ -27,6 +28,7 @@
#include "base/synchronization/lock.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_local.h"
+#include "base/timer/elapsed_timer.h"
#include "base/tracked_objects.h"
#include "build/build_config.h"
#include "components/tracing/child_trace_message_filter.h"
@@ -418,7 +420,10 @@ void ChildThreadImpl::Init(const Options& options) {
if (!pipe_token.empty() && MojoShellConnectionImpl::Get()) {
mojo::ScopedMessagePipeHandle pipe =
mojo::edk::CreateChildMessagePipe(pipe_token);
+
+ base::ElapsedTimer timer;
MojoShellConnectionImpl::Get()->BindToMessagePipe(std::move(pipe));
+ UMA_HISTOGRAM_TIMES("Mojo.Shell.ChildConnectionTime", timer.Elapsed());
}
mojo_application_.reset(new MojoApplication(GetIOTaskRunner()));
« no previous file with comments | « no previous file | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698