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

Side by Side Diff: ui/latency/latency_tracker.cc

Issue 2924943004: Add ScrollBegin.Touch/Wheel Event to UKM (Closed)
Patch Set: Rebase & edit UKM summary Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/metrics/ukm/ukm.xml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/latency/latency_tracker.h" 5 #include "ui/latency/latency_tracker.h"
6 6
7 #include "base/metrics/histogram_functions.h" 7 #include "base/metrics/histogram_functions.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "ui/latency/latency_histogram_macros.h" 9 #include "ui/latency/latency_histogram_macros.h"
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // scroll event's underlying touch/wheel event. 152 // scroll event's underlying touch/wheel event.
153 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS( 153 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
154 "Event.Latency.ScrollBegin." + input_modality + 154 "Event.Latency.ScrollBegin." + input_modality +
155 ".TimeToScrollUpdateSwapBegin2", 155 ".TimeToScrollUpdateSwapBegin2",
156 original_component, gpu_swap_begin_component); 156 original_component, gpu_swap_begin_component);
157 157
158 ReportRapporScrollLatency("Event.Latency.ScrollBegin." + input_modality + 158 ReportRapporScrollLatency("Event.Latency.ScrollBegin." + input_modality +
159 ".TimeToScrollUpdateSwapBegin2", 159 ".TimeToScrollUpdateSwapBegin2",
160 original_component, gpu_swap_begin_component); 160 original_component, gpu_swap_begin_component);
161 161
162 ReportUkmScrollLatency("Event.ScrollBegin." + input_modality,
163 "TimeToScrollUpdateSwapBegin", original_component,
164 gpu_swap_begin_component);
165
162 // TODO(lanwei): Will remove them when M56 is stable, see 166 // TODO(lanwei): Will remove them when M56 is stable, see
163 // https://crbug.com/669618. 167 // https://crbug.com/669618.
164 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS( 168 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
165 "Event.Latency.ScrollUpdate." + input_modality + 169 "Event.Latency.ScrollUpdate." + input_modality +
166 ".TimeToFirstScrollUpdateSwapBegin2", 170 ".TimeToFirstScrollUpdateSwapBegin2",
167 original_component, gpu_swap_begin_component); 171 original_component, gpu_swap_begin_component);
168 } else if (latency.FindLatency( 172 } else if (latency.FindLatency(
169 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 173 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
170 &original_component)) { 174 &original_component)) {
171 // This UMA metric tracks the time from when the original touch event is 175 // This UMA metric tracks the time from when the original touch event is
172 // created to when the scroll gesture results in final frame swap. 176 // created to when the scroll gesture results in final frame swap.
173 // First scroll events are excluded from this metric. 177 // First scroll events are excluded from this metric.
174 if (input_modality == "Touch") { 178 if (input_modality == "Touch") {
175 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS( 179 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
176 "Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin2", 180 "Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin2",
177 original_component, gpu_swap_begin_component); 181 original_component, gpu_swap_begin_component);
178 182
179 ReportRapporScrollLatency( 183 ReportRapporScrollLatency(
180 "Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin2", 184 "Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin2",
181 original_component, gpu_swap_begin_component); 185 original_component, gpu_swap_begin_component);
186
182 ReportUkmScrollLatency("Event.ScrollUpdate.Touch", 187 ReportUkmScrollLatency("Event.ScrollUpdate.Touch",
183 "TimeToScrollUpdateSwapBegin", original_component, 188 "TimeToScrollUpdateSwapBegin", original_component,
184 gpu_swap_begin_component); 189 gpu_swap_begin_component);
185 } 190 }
186 } else if (latency.FindLatency(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 191 } else if (latency.FindLatency(ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0,
187 &original_component)) { 192 &original_component)) {
188 if (input_modality == "KeyPress") { 193 if (input_modality == "KeyPress") {
189 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS( 194 UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
190 "Event.Latency.EndToEnd.KeyPress", original_component, 195 "Event.Latency.EndToEnd.KeyPress", original_component,
191 gpu_swap_begin_component); 196 gpu_swap_begin_component);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 "Event.Latency." + scroll_name + "." + input_modality + 242 "Event.Latency." + scroll_name + "." + input_modality +
238 ".BrowserNotifiedToBeforeGpuSwap2", 243 ".BrowserNotifiedToBeforeGpuSwap2",
239 browser_received_swap_component, gpu_swap_begin_component); 244 browser_received_swap_component, gpu_swap_begin_component);
240 245
241 UMA_HISTOGRAM_SCROLL_LATENCY_SHORT_2( 246 UMA_HISTOGRAM_SCROLL_LATENCY_SHORT_2(
242 "Event.Latency." + scroll_name + "." + input_modality + ".GpuSwap2", 247 "Event.Latency." + scroll_name + "." + input_modality + ".GpuSwap2",
243 gpu_swap_begin_component, gpu_swap_end_component); 248 gpu_swap_begin_component, gpu_swap_end_component);
244 } 249 }
245 250
246 } // namespace ui 251 } // namespace ui
OLDNEW
« no previous file with comments | « tools/metrics/ukm/ukm.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698