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

Unified Diff: ui/base/latency_info.cc

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, 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 side-by-side diff with in-line comments
Download patch
« ui/base/latency_info.h ('K') | « ui/base/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/base/latency_info.cc
diff --git a/ui/base/latency_info.cc b/ui/base/latency_info.cc
index eb8b34ca0ccd520a526ae502fee49361a87a1af5..b2ff6ef1c43fe0f03e520552bbf195250de8e28f 100644
--- a/ui/base/latency_info.cc
+++ b/ui/base/latency_info.cc
@@ -58,9 +58,19 @@ void LatencyInfo::AddLatencyNumberWithTimestamp(LatencyComponentType component,
}
}
+bool LatencyInfo::FindLatency(LatencyComponentType type,
+ int64 id,
+ LatencyComponent* output) const {
+ LatencyMap::const_iterator it = latency_components.find(
+ std::make_pair(type, id));
+ if (it == latency_components.end())
+ return false;
+ *output = it->second;
+ return true;
+}
+
void LatencyInfo::Clear() {
latency_components.clear();
}
} // namespace ui
-
« ui/base/latency_info.h ('K') | « ui/base/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698