Bug 1487559 - add new telemetry probe for the mime type causing suspension for back pressure r=francois,valentin

Differential Revision: https://phabricator.services.mozilla.com/D4729

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Junior Hsu 2018-10-24 16:26:19 +00:00
parent fa2fc2145a
commit 8f2bbcfceb
2 changed files with 18 additions and 1 deletions

View File

@ -1645,6 +1645,15 @@ HttpChannelParent::OnStopRequest(nsIRequest *aRequest,
AccumulateCategorical(Telemetry::LABELS_NETWORK_BACK_PRESSURE_SUSPENSION_RATE_V2::NotSuspended);
} else {
AccumulateCategorical(Telemetry::LABELS_NETWORK_BACK_PRESSURE_SUSPENSION_RATE_V2::Suspended);
// Only analyze non-local suspended cases, which we are interested in.
nsCOMPtr<nsILoadInfo> loadInfo;
if (NS_SUCCEEDED(mChannel->GetLoadInfo(getter_AddRefs(loadInfo)))) {
nsContentPolicyType type = loadInfo ?
loadInfo->InternalContentPolicyType() :
nsIContentPolicy::TYPE_OTHER;
Telemetry::Accumulate(Telemetry::NETWORK_BACK_PRESSURE_SUSPENSION_CP_TYPE, type);
}
}
} else {
if (!mHasSuspendedByBackPressure) {
@ -1654,7 +1663,6 @@ HttpChannelParent::OnStopRequest(nsIRequest *aRequest,
}
}
}
return NS_OK;
}

View File

@ -2007,6 +2007,15 @@
"labels": ["Suspended", "NotSuspended", "SuspendedLocal", "NotSuspendedLocal"],
"description": "Collect whether the resource is suspended by back pressure. And split by local-ness."
},
"NETWORK_BACK_PRESSURE_SUSPENSION_CP_TYPE": {
"record_in_processes": ["main"],
"expires_in_version": "68",
"alert_emails": ["necko@mozilla.com", "junior@mozilla.com"],
"bug_numbers": [1487559],
"kind": "enumerated",
"n_values": 64,
"description": "Collect the content policy when the resource is non-local and suspended by back pressure (0-44 from nsContentPolicyType in nsIContentPolicy.idl)."
},
"NETWORK_HTTP_REDIRECT_TO_SCHEME" :{
"record_in_processes": ["main"],
"alert_emails": ["necko@mozilla.com", "seceng-telemetry@mozilla.com", "jkt@mozilla.com"],