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

Unified Diff: ui/events/latency_info.cc

Issue 2341413002: New scroll latency metrics added for touch and wheel. (Closed)
Patch Set: Use thread_name to compute _MAin, _Impl only once. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index fcad232fa7d343fbdf6343b9de0ac8154a415c47..feeea9542f26198573cf2372eb96ad3b7a744f40 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -279,7 +279,8 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
LatencyMap::key_type key = std::make_pair(component, id);
LatencyMap::iterator it = latency_components_.find(key);
if (it == latency_components_.end()) {
- LatencyComponent info = {component_sequence_number, time, event_count};
+ LatencyComponent info = {component_sequence_number, time, event_count, time,
+ time};
latency_components_[key] = info;
} else {
it->second.sequence_number = std::max(component_sequence_number,
@@ -292,6 +293,7 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
it->second.event_time += (time - it->second.event_time) * event_count /
new_count;
it->second.event_count = new_count;
+ it->second.last_event_time = std::max(it->second.last_event_time, time);
}
}
« no previous file with comments | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698