Commit 882d5657 authored by Navid Zolghadr's avatar Navid Zolghadr Committed by Commit Bot

Add an overall metric for scrolling via touch/wheel

Measure the scrolling performance regardless of
whether touch or wheel input triggered the scrolling.

Bug: 842846
Change-Id: I04750f3537f4da326e9a2f3c0e16e895bc696c2a
Reviewed-on: https://chromium-review.googlesource.com/1059583Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Reviewed-by: default avatarSahel Sharifymoghaddam <sahel@chromium.org>
Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558774}
parent a359096c
......@@ -248,6 +248,14 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestWheelToFirstScrollHistograms) {
total_ukm_entry_count);
// UMA histograms.
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin."
"TimeToScrollUpdateSwapBegin",
1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollUpdate."
"TimeToScrollUpdateSwapBegin",
0));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin.Wheel."
"TimeToScrollUpdateSwapBegin2",
......@@ -344,6 +352,14 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestWheelToScrollHistograms) {
total_ukm_entry_count);
// UMA histograms.
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin."
"TimeToScrollUpdateSwapBegin",
0));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollUpdate."
"TimeToScrollUpdateSwapBegin",
1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin.Wheel."
"TimeToScrollUpdateSwapBegin2",
......@@ -463,6 +479,14 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestTouchToFirstScrollHistograms) {
total_ukm_entry_count);
// UMA histograms.
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin."
"TimeToScrollUpdateSwapBegin",
1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollUpdate."
"TimeToScrollUpdateSwapBegin",
0));
EXPECT_TRUE(HistogramSizeEq(
"Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin2", 1));
......@@ -565,6 +589,14 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestTouchToScrollHistograms) {
total_ukm_entry_count);
// UMA histograms.
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin."
"TimeToScrollUpdateSwapBegin",
0));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollUpdate."
"TimeToScrollUpdateSwapBegin",
1));
EXPECT_TRUE(HistogramSizeEq(
"Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin2", 0));
EXPECT_TRUE(HistogramSizeEq(
......
......@@ -22837,6 +22837,20 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram name="Event.Latency.ScrollBegin.TimeToScrollUpdateSwapBegin"
units="microseconds">
<owner>nzolghadr@chromium.org</owner>
<summary>
Time between initial creation of a wheel/touch event and start of the frame
swap on the GPU service caused by the generated ScrollUpdate gesture event
if that ScrollUpdate is the first such event in a given scroll gesture event
sequence. If no swap was induced by the event, no recording is made. If no
swap was induced by the event, no recording is made.
Team: input-dev@chromium.org.
</summary>
</histogram>
<histogram
name="Event.Latency.ScrollBegin.Touch.BrowserNotifiedToBeforeGpuSwap2"
units="microseconds">
......@@ -23043,6 +23057,19 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram name="Event.Latency.ScrollUpdate.TimeToScrollUpdateSwapBegin"
units="microseconds">
<owner>nzolghadr@chromium.org</owner>
<summary>
Time between initial creation of a wheel/touch event and start of the frame
swap on the GPU service caused by the generated ScrollUpdate gesture event.
If no swap was induced by the event, no recording is made. The first GSU of
every scrolling sequence is excluded from this metric.
Team: input-dev@chromium.org.
</summary>
</histogram>
<histogram
name="Event.Latency.ScrollUpdate.Touch.BrowserNotifiedToBeforeGpuSwap2"
units="microseconds">
......@@ -12,7 +12,7 @@
DCHECK(!start.first_event_time.is_null()); \
DCHECK(!end.last_event_time.is_null());
// Event latency that is mostly under 1 second. We should only use 100 buckets
// Event latency that is mostly under 2 seconds. We should only use 100 buckets
// when needed.
#define UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(name, start, \
end) \
......@@ -22,7 +22,7 @@
std::max( \
static_cast<int64_t>(0), \
(end.last_event_time - start.first_event_time).InMicroseconds()), \
1, 1000000, 100);
1, 2000000, 100);
#define UMA_HISTOGRAM_INPUT_LATENCY_MILLISECONDS(name, start, end) \
CONFIRM_EVENT_TIMES_EXIST(start, end) \
......
......@@ -175,6 +175,13 @@ void LatencyTracker::ComputeEndToEndLatencyHistograms(
&original_component)) {
scroll_name = "ScrollBegin";
DCHECK(input_modality == "Wheel" || input_modality == "Touch");
// This UMA metric tracks the performance of overall scrolling as a high
// level metric.
UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
"Event.Latency.ScrollBegin.TimeToScrollUpdateSwapBegin",
original_component, gpu_swap_begin_component);
// This UMA metric tracks the time between the final frame swap for the
// first scroll event in a sequence and the original timestamp of that
// scroll event's underlying touch/wheel event.
......@@ -193,6 +200,13 @@ void LatencyTracker::ComputeEndToEndLatencyHistograms(
&original_component)) {
scroll_name = "ScrollUpdate";
DCHECK(input_modality == "Wheel" || input_modality == "Touch");
// This UMA metric tracks the performance of overall scrolling as a high
// level metric.
UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
"Event.Latency.ScrollUpdate.TimeToScrollUpdateSwapBegin",
original_component, gpu_swap_begin_component);
// This UMA metric tracks the time from when the original touch/wheel event
// is created to when the scroll gesture results in final frame swap.
// First scroll events are excluded from this metric.
......
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