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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2727953002: Added histogram for resize listener duration. (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 7baa82d8bece722b5dba7fea5de4723473a496e9..6e7866c5b5907f00d4a255766900a69498723f20 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -80,6 +80,7 @@
#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
#include "platform/EventDispatchForbiddenScope.h"
+#include "platform/Histogram.h"
#include "platform/WebFrameScheduler.h"
#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/weborigin/SecurityOrigin.h"
@@ -1520,7 +1521,17 @@ DispatchEventResult LocalDOMWindow::dispatchEvent(Event* event,
TRACE_EVENT1("devtools.timeline", "EventDispatch", "data",
InspectorEventDispatchEvent::data(*event));
- return fireEventListeners(event);
+ DispatchEventResult result;
+
+ if (frame() && frame()->isMainFrame() &&
+ event->type() == EventTypeNames::resize) {
+ SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.EventListenerDuration.Resize");
+ result = fireEventListeners(event);
+ } else {
+ result = fireEventListeners(event);
+ }
+
+ return result;
}
void LocalDOMWindow::removeAllEventListeners() {
« 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