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

Unified Diff: ui/latency/mojo/latency_info_struct_traits.cc

Issue 2954473002: Record accuracy of expected queueing time metric. (Closed)
Patch Set: Set trace ID in test. Created 3 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
« no previous file with comments | « ui/latency/mojo/latency_info_struct_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/latency/mojo/latency_info_struct_traits.cc
diff --git a/ui/latency/mojo/latency_info_struct_traits.cc b/ui/latency/mojo/latency_info_struct_traits.cc
index 8e27b541be028b54eb273352ef12b6a835d28eea..955de5fdf406bc828d921a5c6683dda3395c702e 100644
--- a/ui/latency/mojo/latency_info_struct_traits.cc
+++ b/ui/latency/mojo/latency_info_struct_traits.cc
@@ -309,6 +309,12 @@ StructTraits<ui::mojom::LatencyInfoDataView,
return UISourceEventTypeToMojo(info.source_event_type());
}
+// static
+base::TimeDelta StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::
+ expected_queueing_time_on_dispatch(const ui::LatencyInfo& info) {
+ return info.expected_queueing_time_on_dispatch();
+}
+
// static
bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::Read(
ui::mojom::LatencyInfoDataView data,
@@ -334,7 +340,9 @@ bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::Read(
out->began_ = data.began();
out->terminated_ = data.terminated();
out->source_event_type_ = MojoSourceEventTypeToUI(data.source_event_type());
- return true;
+
+ return data.ReadExpectedQueueingTimeOnDispatch(
+ &out->expected_queueing_time_on_dispatch_);
}
} // namespace mojo
« no previous file with comments | « ui/latency/mojo/latency_info_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698