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

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: add LatencyInfo::FindLatency() && Only use one metric for touch ack latency Created 7 years, 5 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int64 component_sequence_number); 56 int64 component_sequence_number);
57 57
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 // Returns true if the a component with |type| and |id| is found in
67 // the latency_components and the component is stored to |output|.
68 // Returns false if no such component is found.
69 bool FindLatency(LatencyComponentType type,
sadrul 2013/06/27 17:44:01 Merge this with HasLatency
Yufeng Shen (Slow to review) 2013/06/27 19:01:03 Done.
70 int64 id,
71 LatencyComponent* output) const;
72
66 void Clear(); 73 void Clear();
67 74
68 LatencyMap latency_components; 75 LatencyMap latency_components;
69 76
70 // This represents the final time that a frame is displayed it. 77 // This represents the final time that a frame is displayed it.
71 base::TimeTicks swap_timestamp; 78 base::TimeTicks swap_timestamp;
72 }; 79 };
73 80
74 } // namespace ui 81 } // namespace ui
75 82
76 #endif // UI_BASE_LATENCY_INFO_H_ 83 #endif // UI_BASE_LATENCY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698