Commit 8720ec3a authored by Bryan McQuade's avatar Bryan McQuade Committed by Commit Bot

Add MainFrameResource.NavigationStartToReceiveHeadersStart UKM metric.

This metric will be used for a time to first byte metric in
Chrome User Experience Report.

UKM collection review: https://docs.google.com/document/d/1U0gT3RalytZqPW9t-4lBweBwLaamXYdJaO4ETsuvCdU/edit#heading=h.k5jx6iluw4yt

Change-Id: Ie311d28f98b90f4361845e10843fa50f066c32b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628048Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Bryan McQuade <bmcquade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663169}
parent 8189bb9c
......@@ -520,6 +520,15 @@ void UkmPageLoadMetricsObserver::ReportMainResourceTimingMetrics(
navigation_start_to_request_start.InMilliseconds());
}
if (!main_frame_timing_->receive_headers_start.is_null() &&
!GetDelegate()->GetNavigationStart().is_null()) {
base::TimeDelta navigation_start_to_receive_headers_start =
main_frame_timing_->receive_headers_start -
GetDelegate()->GetNavigationStart();
builder->SetMainFrameResource_NavigationStartToReceiveHeadersStart(
navigation_start_to_receive_headers_start.InMilliseconds());
}
if (connection_info_.has_value()) {
page_load_metrics::NetworkProtocol protocol =
page_load_metrics::GetNetworkProtocol(*connection_info_);
......
......@@ -4998,6 +4998,12 @@ be describing additional metrics about the same event.
tools/metrics/histograms/enum.xml.
</summary>
</metric>
<metric name="MainFrameResource.NavigationStartToReceiveHeadersStart">
<summary>
The duration from the start of the navigation to the start of the response
headers being received. In ms.
</summary>
</metric>
<metric name="MainFrameResource.NavigationStartToRequestStart">
<summary>
The duration from the start of the navigation to the start of the main
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment