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

Side by Side Diff: ui/base/latency_info.h

Issue 17757002: Add UMA/Telemetry stats for touch event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address various issues Created 7 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
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 #ifndef UI_BASE_LATENCY_INFO_H_ 5 #ifndef UI_BASE_LATENCY_INFO_H_
6 #define UI_BASE_LATENCY_INFO_H_ 6 #define UI_BASE_LATENCY_INFO_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Modifies the current sequence number and adds a certain number of events 58 // Modifies the current sequence number and adds a certain number of events
59 // for a specific component. 59 // for a specific component.
60 void AddLatencyNumberWithTimestamp(LatencyComponentType component, 60 void AddLatencyNumberWithTimestamp(LatencyComponentType component,
61 int64 id, 61 int64 id,
62 int64 component_sequence_number, 62 int64 component_sequence_number,
63 base::TimeTicks time, 63 base::TimeTicks time,
64 uint32 event_count); 64 uint32 event_count);
65 65
66 void Clear(); 66 void Clear();
67 67
68 LatencyMap::const_iterator GetLatencyComponent(LatencyComponentType type,
Rick Byers 2013/06/26 21:42:10 Rather than return an iterator, may be easier to u
Yufeng Shen (Slow to review) 2013/06/26 23:02:26 Done.
69 int64 id) const {
70 return latency_components.find(std::make_pair(type, id));
71 }
72
68 LatencyMap latency_components; 73 LatencyMap latency_components;
69 74
70 // This represents the final time that a frame is displayed it. 75 // This represents the final time that a frame is displayed it.
71 base::TimeTicks swap_timestamp; 76 base::TimeTicks swap_timestamp;
72 }; 77 };
73 78
74 } // namespace ui 79 } // namespace ui
75 80
76 #endif // UI_BASE_LATENCY_INFO_H_ 81 #endif // UI_BASE_LATENCY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698