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

Side by Side Diff: content/common/browser_rendering_stats.cc

Issue 16213002: Add telemetry to track the time an event spent waiting for the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/browser_rendering_stats.h" 5 #include "content/common/browser_rendering_stats.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 BrowserRenderingStats::BrowserRenderingStats() : 9 BrowserRenderingStats::BrowserRenderingStats() :
10 input_event_count(0), 10 input_event_count(0),
11 touch_ui_count(0), 11 touch_ui_count(0),
12 touch_acked_count(0), 12 touch_acked_count(0),
13 scroll_update_count(0) { 13 scroll_update_count(0),
14 impl_to_main_touch_event_count(0),
15 impl_to_main_gesture_scroll_event_count(0) {
14 } 16 }
15 17
16 BrowserRenderingStats::~BrowserRenderingStats() {} 18 BrowserRenderingStats::~BrowserRenderingStats() {}
17 19
18 void BrowserRenderingStats::EnumerateFields( 20 void BrowserRenderingStats::EnumerateFields(
19 cc::RenderingStats::Enumerator* enumerator) const { 21 cc::RenderingStats::Enumerator* enumerator) const {
20 enumerator->AddInt("inputEventCount", input_event_count); 22 enumerator->AddInt("inputEventCount", input_event_count);
21 enumerator->AddTimeDeltaInSecondsF("totalInputLatency", total_input_latency); 23 enumerator->AddTimeDeltaInSecondsF("totalInputLatency", total_input_latency);
22 24
23 enumerator->AddInt("touchUICount", touch_ui_count); 25 enumerator->AddInt("touchUICount", touch_ui_count);
24 enumerator->AddTimeDeltaInSecondsF("totalTouchUILatency", 26 enumerator->AddTimeDeltaInSecondsF("totalTouchUILatency",
25 total_touch_ui_latency); 27 total_touch_ui_latency);
26 28
27 enumerator->AddInt("touchAckedCount", touch_acked_count); 29 enumerator->AddInt("touchAckedCount", touch_acked_count);
28 enumerator->AddTimeDeltaInSecondsF("totalTouchAckedLatency", 30 enumerator->AddTimeDeltaInSecondsF("totalTouchAckedLatency",
29 total_touch_acked_latency); 31 total_touch_acked_latency);
30 32
31 enumerator->AddInt("scrollUpdateCount", scroll_update_count); 33 enumerator->AddInt("scrollUpdateCount", scroll_update_count);
32 enumerator->AddTimeDeltaInSecondsF("totalScrollUpdateLatency", 34 enumerator->AddTimeDeltaInSecondsF("totalScrollUpdateLatency",
33 total_scroll_update_latency); 35 total_scroll_update_latency);
36
37 enumerator->AddInt("implToMainTouchEventCount",
38 impl_to_main_touch_event_count);
39 enumerator->AddTimeDeltaInSecondsF("totalImplToMainTouchEventLatency",
40 total_impl_to_main_touch_event_latency);
41 enumerator->AddInt("implToMainGestureScrollEventCount",
42 impl_to_main_gesture_scroll_event_count);
43 enumerator->AddTimeDeltaInSecondsF("totalImplToMainGestureScrollEventLatency",
44 total_impl_to_main_gesture_scroll_event_latency);
34 } 45 }
35 46
36 } // namespace content 47 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698