зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675503 - Add telemetry for the page load time and the time to first paint for sites that support HTTP3 r=smaug,bas
This will be collected for sites that have used HTTP3 and for sites that support HTTP3 but HTTP3 has not been used. Differential Revision: https://phabricator.services.mozilla.com/D96787
This commit is contained in:
Родитель
a051dd1b28
Коммит
0b60e1a125
|
@ -1931,11 +1931,39 @@ void Document::AccumulatePageLoadTelemetry() {
|
|||
return;
|
||||
}
|
||||
|
||||
nsCString http3Key;
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpChannel =
|
||||
do_QueryInterface(GetChannel());
|
||||
if (httpChannel) {
|
||||
uint32_t major;
|
||||
uint32_t minor;
|
||||
if (NS_SUCCEEDED(httpChannel->GetResponseVersion(&major, &minor))) {
|
||||
if (major == 3) {
|
||||
http3Key = "http3"_ns;
|
||||
} else if (major == 2) {
|
||||
bool supportHttp3 = false;
|
||||
if (NS_FAILED(httpChannel->GetSupportsHTTP3(&supportHttp3))) {
|
||||
supportHttp3 = false;
|
||||
}
|
||||
if (supportHttp3) {
|
||||
http3Key = "supports_http3"_ns;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// First Contentful Paint
|
||||
if (TimeStamp firstContentfulPaint =
|
||||
GetNavigationTiming()->GetFirstContentfulPaintTimeStamp()) {
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::PERF_FIRST_CONTENTFUL_PAINT_MS,
|
||||
navigationStart, firstContentfulPaint);
|
||||
|
||||
if (!http3Key.IsEmpty()) {
|
||||
Telemetry::AccumulateTimeDelta(
|
||||
Telemetry::HTTP3_PERF_FIRST_CONTENTFUL_PAINT_MS, http3Key,
|
||||
navigationStart, firstContentfulPaint);
|
||||
}
|
||||
|
||||
Telemetry::AccumulateTimeDelta(
|
||||
Telemetry::PERF_FIRST_CONTENTFUL_PAINT_FROM_RESPONSESTART_MS,
|
||||
responseStart, firstContentfulPaint);
|
||||
|
@ -1956,6 +1984,11 @@ void Document::AccumulatePageLoadTelemetry() {
|
|||
GetNavigationTiming()->GetLoadEventStartTimeStamp()) {
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::PERF_PAGE_LOAD_TIME_MS,
|
||||
navigationStart, loadEventStart);
|
||||
if (!http3Key.IsEmpty()) {
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::HTTP3_PERF_PAGE_LOAD_TIME_MS,
|
||||
http3Key, navigationStart, loadEventStart);
|
||||
}
|
||||
|
||||
Telemetry::AccumulateTimeDelta(
|
||||
Telemetry::PERF_PAGE_LOAD_TIME_FROM_RESPONSESTART_MS, responseStart,
|
||||
loadEventStart);
|
||||
|
|
|
@ -2112,6 +2112,32 @@
|
|||
"keyed": true,
|
||||
"description": "HTTP channel (keys: uses_http3_page, uses_http3_sub, supports_http3_page, supports_http3_sub): Overall load time - network (ms)"
|
||||
},
|
||||
"HTTP3_PERF_PAGE_LOAD_TIME_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"kind": "exponential",
|
||||
"high": 50000,
|
||||
"n_buckets": 100,
|
||||
"bug_numbers": [1675503],
|
||||
"keyed": true,
|
||||
"description": "Time in milliseconds from navigationStart to loadEventStart for the foreground http or https root content document. This is collected only on page load where the main document uses or suppports HTTP3"
|
||||
},
|
||||
"HTTP3_PERF_FIRST_CONTENTFUL_PAINT_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"kind": "exponential",
|
||||
"high": 50000,
|
||||
"n_buckets": 100,
|
||||
"bug_numbers": [1675503],
|
||||
"keyed": true,
|
||||
"description": "The time between navigationStart and the first contentful paint of a foreground http or https root content document, in milliseconds. The contentful paint timestamp is taken during display list building and does not include rasterization or compositing of that paint. This is collected only on page load where the main document uses or suppports HTTP3"
|
||||
},
|
||||
"HTTP_PROXY_TYPE": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"products": ["firefox", "fennec"],
|
||||
|
|
Загрузка…
Ссылка в новой задаче