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

Unified Diff: chrome/renderer/extensions/tabs_custom_bindings.cc

Issue 2316093004: [Extensions] Add metrics for renderer sync IPCs performance (Closed)
Patch Set: Mark's Created 4 years, 3 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 | extensions/renderer/i18n_custom_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/tabs_custom_bindings.cc
diff --git a/chrome/renderer/extensions/tabs_custom_bindings.cc b/chrome/renderer/extensions/tabs_custom_bindings.cc
index 206a9ee033bea491eedba39b4d612815bafcf082..c1ca16bfb972c0f70bedfb5c507827004019d751 100644
--- a/chrome/renderer/extensions/tabs_custom_bindings.cc
+++ b/chrome/renderer/extensions/tabs_custom_bindings.cc
@@ -9,6 +9,7 @@
#include <string>
#include "base/bind.h"
+#include "base/metrics/histogram_macros.h"
#include "content/public/renderer/render_frame.h"
#include "extensions/common/extension_messages.h"
#include "extensions/renderer/script_context.h"
@@ -48,9 +49,12 @@ void TabsCustomBindings::OpenChannelToTab(
std::string extension_id = *v8::String::Utf8Value(args[2]);
std::string channel_name = *v8::String::Utf8Value(args[3]);
int port_id = -1;
- render_frame->Send(new ExtensionHostMsg_OpenChannelToTab(
- render_frame->GetRoutingID(), info, extension_id, channel_name,
- &port_id));
+ {
+ SCOPED_UMA_HISTOGRAM_TIMER("Extensions.Messaging.GetPortIdSyncTime.Tab");
+ render_frame->Send(new ExtensionHostMsg_OpenChannelToTab(
+ render_frame->GetRoutingID(), info, extension_id, channel_name,
+ &port_id));
+ }
args.GetReturnValue().Set(static_cast<int32_t>(port_id));
}
« no previous file with comments | « no previous file | extensions/renderer/i18n_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698