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

Side by Side Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker.cc

Issue 2416173003: Rename Event.Latency.* to Event.Latency.ScrollUpdate.* (Closed)
Patch Set: Use of obsolete for histograms instead of deleting. Created 4 years, 2 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 | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 5 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 return; 248 return;
249 249
250 LatencyInfo::LatencyComponent original_component; 250 LatencyInfo::LatencyComponent original_component;
251 if (latency.FindLatency( 251 if (latency.FindLatency(
252 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, 252 ui::INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT,
253 latency_component_id, &original_component)) { 253 latency_component_id, &original_component)) {
254 // This UMA metric tracks the time between the final frame swap for the 254 // This UMA metric tracks the time between the final frame swap for the
255 // first scroll event in a sequence and the original timestamp of that 255 // first scroll event in a sequence and the original timestamp of that
256 // scroll event's underlying touch/wheel event. 256 // scroll event's underlying touch/wheel event.
257 UMA_HISTOGRAM_TOUCH_WHEEL_TO_SCROLL_LATENCY( 257 UMA_HISTOGRAM_TOUCH_WHEEL_TO_SCROLL_LATENCY(
258 "Event.Latency." + event_type_name + 258 "Event.Latency.ScrollUpdate." + event_type_name +
259 ".TimeToFirstScrollUpdateSwapBegin2", 259 ".TimeToFirstScrollUpdateSwapBegin2",
260 original_component, gpu_swap_begin_component); 260 original_component, gpu_swap_begin_component);
261 } else if (latency.FindLatency( 261 } else if (latency.FindLatency(
262 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 262 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
263 latency_component_id, &original_component)) { 263 latency_component_id, &original_component)) {
264 // This UMA metric tracks the time from when the original touch event is 264 // This UMA metric tracks the time from when the original touch event is
265 // created to when the scroll gesture results in final frame swap. 265 // created to when the scroll gesture results in final frame swap.
266 // First scroll events are excluded from this metric. 266 // First scroll events are excluded from this metric.
267 if (event_type_name == "Touch") { 267 if (event_type_name == "Touch") {
268 UMA_HISTOGRAM_TOUCH_WHEEL_TO_SCROLL_LATENCY( 268 UMA_HISTOGRAM_TOUCH_WHEEL_TO_SCROLL_LATENCY(
269 "Event.Latency." + event_type_name + ".TimeToScrollUpdateSwapBegin2", 269 "Event.Latency.ScrollUpdate." + event_type_name +
270 ".TimeToScrollUpdateSwapBegin2",
270 original_component, gpu_swap_begin_component); 271 original_component, gpu_swap_begin_component);
271 } 272 }
272 } else { 273 } else {
273 // No original component found. 274 // No original component found.
274 return; 275 return;
275 } 276 }
276 277
277 LatencyInfo::LatencyComponent rendering_scheduled_component; 278 LatencyInfo::LatencyComponent rendering_scheduled_component;
278 bool rendering_scheduled_on_main = latency.FindLatency( 279 bool rendering_scheduled_on_main = latency.FindLatency(
279 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT, 0, 280 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT, 0,
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 if (!latency.FindLatency( 713 if (!latency.FindLatency(
713 ui::INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL, 0, 714 ui::INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL, 0,
714 &mouse_wheel_scroll_update_component)) { 715 &mouse_wheel_scroll_update_component)) {
715 ComputeScrollLatencyHistograms( 716 ComputeScrollLatencyHistograms(
716 gpu_swap_begin_component, gpu_swap_end_component, latency_component_id_, 717 gpu_swap_begin_component, gpu_swap_end_component, latency_component_id_,
717 latency, is_running_navigation_hint_task); 718 latency, is_running_navigation_hint_task);
718 } 719 }
719 } 720 }
720 721
721 } // namespace content 722 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698