Bug 1792029 - Change the probe "open_to_transaction_pending" to be a keyed histogram r=necko-reviewers,kershaw

We're keying by classOfService since we don't want to merge prioritized and deprioritized channels.

Differential Revision: https://phabricator.services.mozilla.com/D158596
This commit is contained in:
Andrew Creskey 2022-10-06 13:25:02 +00:00
Родитель df9e202b62
Коммит 833dbdc5a1
4 изменённых файлов: 15 добавлений и 26 удалений

Просмотреть файл

@ -9,22 +9,3 @@
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
$tags:
- 'Core :: Networking'
network:
open_to_transaction_pending:
type: timing_distribution
description: >
The time spent from HttpChannelChild::AsyncOpen to adding the transaction
to the nsHttpConnectionMgr
time_unit: millisecond
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1789468
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1789468
data_sensitivity:
- technical
notification_emails:
- necko@mozilla.com
- acreskey@mozilla.com
expires: never
telemetry_mirror: NETWORK_ASYNC_OPEN_TO_TRANSACTION_PENDING_MS

Просмотреть файл

@ -5,8 +5,11 @@
#ifndef __ClassOfService_h__
#define __ClassOfService_h__
#include "nsIClassOfService.h"
#include "ipc/IPCMessageUtils.h"
#include <bitset>
namespace mozilla::net {
class ClassOfService {
@ -23,6 +26,10 @@ class ClassOfService {
bool Incremental() const { return mIncremental; }
void SetIncremental(bool incremental) { mIncremental = incremental; }
static nsCString ToString(const ClassOfService cos) {
return nsCString(std::bitset<32>(cos.Flags()).to_string());
}
private:
unsigned long mClassFlags;
bool mIncremental;

Просмотреть файл

@ -38,8 +38,8 @@
#include "nsNetUtil.h"
#include "nsSerializationHelper.h"
#include "mozilla/Attributes.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/PerformanceStorage.h"
#include "mozilla/glean/GleanMetrics.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/ipc/BackgroundUtils.h"
@ -454,10 +454,10 @@ void HttpChannelChild::OnStartRequest(
if (!mAsyncOpenTime.IsNull() &&
!aArgs.timing().transactionPending().IsNull()) {
TimeDuration asyncOpenToTransactionPending =
aArgs.timing().transactionPending() - mAsyncOpenTime;
glean::network::open_to_transaction_pending.AccumulateRawDuration(
asyncOpenToTransactionPending);
Telemetry::AccumulateTimeDelta(
Telemetry::NETWORK_ASYNC_OPEN_TO_TRANSACTION_PENDING_MS,
ClassOfService::ToString(mClassOfService), mAsyncOpenTime,
aArgs.timing().transactionPending());
}
StoreAllRedirectsSameOrigin(aArgs.allRedirectsSameOrigin());

Просмотреть файл

@ -3058,14 +3058,15 @@
},
"NETWORK_ASYNC_OPEN_TO_TRANSACTION_PENDING_MS" :{
"record_in_processes": ["content"],
"products": [ "firefox", "fennec", "geckoview_streaming" ],
"products": [ "firefox", "fennec" ],
"alert_emails": ["necko@mozilla.com", "acreskey@mozilla.com"],
"bug_numbers": [1789468],
"expires_in_version": "never",
"keyed": true,
"kind": "linear",
"high": 5000,
"n_buckets": 50,
"description": "The time spent from HttpChannelChild::AsyncOpen to adding the transactionto the nsHttpConnectionMgr, in milliseconds"
"description": "The time spent from HttpChannelChild::AsyncOpen to adding the transactionto the nsHttpConnectionMgr, in milliseconds, keyed by classOfService"
},
"HTTP_AUTH_DIALOG_STATS_3": {
"record_in_processes": ["main", "content"],