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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2774813002: Hang Monitor UMA (Closed)
Patch Set: fixed typo and period Created 3 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 | « content/browser/renderer_host/render_widget_host_impl.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8d2390a91305f963ac4fda2f743aedaa71d82852..90afecd8290a9633cee6f2b9de069c68d3f5951a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -967,6 +967,8 @@ void RenderWidgetHostImpl::ProcessIgnoreInputEventsChanged(
void RenderWidgetHostImpl::StartHangMonitorTimeout(
base::TimeDelta delay,
blink::WebInputEvent::Type event_type) {
+ if (hang_start_time_.is_null())
+ hang_start_time_ = TimeTicks::Now();
if (!hang_monitor_timeout_)
return;
if (!hang_monitor_timeout_->IsRunning())
@@ -976,18 +978,29 @@ void RenderWidgetHostImpl::StartHangMonitorTimeout(
}
void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() {
- if (!hang_monitor_timeout_)
- return;
- if (in_flight_event_count_ > 0 && !is_hidden_)
- hang_monitor_timeout_->Restart(hung_renderer_delay_);
+ if (in_flight_event_count_ > 0 && !is_hidden_) {
+ LogHangMonitorUnresponsive();
+ hang_start_time_ = TimeTicks::Now();
+ if (hang_monitor_timeout_)
+ hang_monitor_timeout_->Restart(hung_renderer_delay_);
+ }
}
void RenderWidgetHostImpl::StopHangMonitorTimeout() {
+ LogHangMonitorUnresponsive();
+ hang_start_time_ = TimeTicks();
if (hang_monitor_timeout_)
hang_monitor_timeout_->Stop();
RendererIsResponsive();
}
+void RenderWidgetHostImpl::LogHangMonitorUnresponsive() {
+ if (!hang_start_time_.is_null()) {
+ UMA_HISTOGRAM_TIMES("MPArch.RWH_HangMonitorUnresponsive",
+ TimeTicks::Now() - hang_start_time_);
+ }
+}
+
void RenderWidgetHostImpl::StartNewContentRenderingTimeout(
uint32_t next_source_id) {
current_content_source_id_ = next_source_id;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698