Commit b97a0925 authored by Peiyong Lin's avatar Peiyong Lin Committed by Commit Bot

[scheduler] Adds histogram to record the number of frame visibility change.

We want to plumb frame visibility change to GRC. Before that, we want to
understand the volume of IPC. This patch adds histogram to record the frame
visibility when it's changed.

BUG=790680

Change-Id: Ib798308bf18473c1432cbe651ac9217714115b9a
Reviewed-on: https://chromium-review.googlesource.com/807351Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522002}
parent 5ef8abbc
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "platform/scheduler/renderer/web_frame_scheduler_impl.h" #include "platform/scheduler/renderer/web_frame_scheduler_impl.h"
#include <memory> #include <memory>
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/blame_context.h" #include "base/trace_event/blame_context.h"
#include "platform/runtime_enabled_features.h" #include "platform/runtime_enabled_features.h"
#include "platform/scheduler/base/real_time_domain.h" #include "platform/scheduler/base/real_time_domain.h"
...@@ -187,6 +188,7 @@ void WebFrameSchedulerImpl::SetFrameVisible(bool frame_visible) { ...@@ -187,6 +188,7 @@ void WebFrameSchedulerImpl::SetFrameVisible(bool frame_visible) {
DCHECK(parent_web_view_scheduler_); DCHECK(parent_web_view_scheduler_);
if (frame_visible_ == frame_visible) if (frame_visible_ == frame_visible)
return; return;
UMA_HISTOGRAM_BOOLEAN("RendererScheduler.IPC.FrameVisibility", frame_visible);
bool was_throttled = ShouldThrottleTimers(); bool was_throttled = ShouldThrottleTimers();
frame_visible_ = frame_visible; frame_visible_ = frame_visible;
UpdateThrottling(was_throttled); UpdateThrottling(was_throttled);
......
...@@ -69604,6 +69604,15 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -69604,6 +69604,15 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="RendererScheduler.IPC.FrameVisibility" enum="Boolean">
<owner>altimin@chromium.org</owner>
<owner>lpy@chromium.org</owner>
<summary>
This boolean keeps track the count of the visibility change of a frame.
Recorded every time when the visibility of a frame is changed.
</summary>
</histogram>
<histogram name="RendererScheduler.MaxQueueingTime" units="ms"> <histogram name="RendererScheduler.MaxQueueingTime" units="ms">
<owner>maxlg@chromium.org</owner> <owner>maxlg@chromium.org</owner>
<summary> <summary>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment