Bug 1795775 - Add a telemetry probe to measure the time spent relaying the completion of a network request from the parent process to the child r=necko-reviewers,valentin

We are looking for any unexpected delays in the delivering of this event to the child process.

Differential Revision: https://phabricator.services.mozilla.com/D159892
This commit is contained in:
Andrew Creskey 2022-10-26 17:30:37 +00:00
parent 47eb2687ea
commit c18827cbba
2 changed files with 20 additions and 0 deletions

View file

@ -908,6 +908,14 @@ void HttpChannelChild::OnStopRequest(
PerfStats::RecordMeasurement(PerfStats::Metric::HttpChannelCompletion,
channelCompletionDuration);
if (!aTiming.responseEnd().IsNull()) {
nsAutoCString cosString;
ClassOfService::ToString(mClassOfService, cosString);
Telemetry::AccumulateTimeDelta(
Telemetry::NETWORK_RESPONSE_END_PARENT_TO_CONTENT_MS, cosString,
aTiming.responseEnd(), TimeStamp::Now());
}
mResponseTrailers = MakeUnique<nsHttpHeaderArray>(aResponseTrailers);
DoPreOnStopRequest(aChannelStatus);

View file

@ -3114,6 +3114,18 @@
"n_buckets": 50,
"description": "The time spent from dns resolution to connect start, in milliseconds, keyed by protocol version and the classOfService flags"
},
"NETWORK_RESPONSE_END_PARENT_TO_CONTENT_MS" :{
"record_in_processes": ["content"],
"products": [ "firefox", "fennec" ],
"alert_emails": ["necko@mozilla.com", "acreskey@mozilla.com"],
"bug_numbers": [1795775],
"expires_in_version": "never",
"keyed": true,
"kind": "exponential",
"high": 2000,
"n_buckets": 50,
"description": "The time spent relaying response completion from the socket thread of the parent process to the content process, in milliseconds, keyed by the classOfService flags"
},
"HTTP_AUTH_DIALOG_STATS_3": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],