commit 898aa6ef1ce8a2739a0d0a9b489014a3e11cca7d
parent bb807f8739cf89969f3d9a0e042935b853a95f16
Author: Oskar Mansfeld <git@omansfeld.net>
Date: Tue, 16 Dec 2025 14:54:02 +0000
Bug 2004717 - Add glean probe counting whether an HTTP3 connection exited slow start. r=mxinden,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D275481
Diffstat:
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/netwerk/metrics.yaml b/netwerk/metrics.yaml
@@ -1113,6 +1113,24 @@ networking:
- omansfeld@mozilla.com
expires: 157
+ http_3_slow_start_exited:
+ type: labeled_counter
+ description: >
+ Counts whether an HTTP3 connections exited slow start.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=2004717
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=2004717
+ data_sensitivity:
+ - technical
+ notification_emails:
+ - necko@mozilla.com
+ - omansfeld@mozilla.com
+ expires: 157
+ labels:
+ - exited
+ - not_exited
+
http_3_connection_close_reason:
type: labeled_counter
description: >
diff --git a/netwerk/socket/neqo_glue/src/lib.rs b/netwerk/socket/neqo_glue/src/lib.rs
@@ -672,8 +672,9 @@ impl NeqoHttp3Conn {
}
}
- // Ignore connections into the void.
+ // Ignore connections into the void for metrics where it makes sense.
if stats.packets_rx != 0 {
+ // Calculate and collect packet loss ratio.
if let Ok(loss) =
i64::try_from((stats.lost * PRECISION_FACTOR_USIZE) / stats.packets_tx)
{
@@ -683,9 +684,16 @@ impl NeqoHttp3Conn {
qwarn!("{msg}");
debug_assert!(false, "{msg}");
}
+
+ // Count whether the connection exited slow start.
+ if stats.cc.slow_start_exited {
+ glean::http_3_slow_start_exited.get("exited").add(1);
+ } else {
+ glean::http_3_slow_start_exited.get("not_exited").add(1);
+ }
}
- // Ignore connections that never had loss induced congestion events (and prevent dividing by zero)
+ // Ignore connections that never had loss induced congestion events (and prevent dividing by zero).
if stats.cc.congestion_events_loss != 0 {
if let Ok(spurious) = i64::try_from(
(stats.cc.congestion_events_spurious * PRECISION_FACTOR_USIZE)