Upgrade to qlog 0.17

This commit is contained in:
Dirkjan Ochtman
2026-04-07 12:13:36 +02:00
parent 905e1090f9
commit d8db7a047a
5 changed files with 31 additions and 35 deletions
Generated
+12 -15
View File
@@ -891,7 +891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -1915,14 +1915,14 @@ dependencies = [
[[package]]
name = "qlog"
version = "0.16.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16689c500fede96aa7d5e1f8924abe08fafb65146d7e192826bb5fb57a1e1ad0"
checksum = "13932f4f3e6b912a43b3af40a3174614b8408c85059b79ef23fe1b3c87e5d04a"
dependencies = [
"humantime",
"serde",
"serde_json",
"serde_with",
"smallvec",
]
[[package]]
@@ -1997,7 +1997,7 @@ dependencies = [
"socket2",
"tokio",
"tracing",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -2155,7 +2155,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -2214,7 +2214,7 @@ dependencies = [
"security-framework",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -2334,9 +2334,9 @@ dependencies = [
[[package]]
name = "serde_with"
version = "3.16.1"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7"
checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9"
dependencies = [
"serde_core",
"serde_with_macros",
@@ -2344,9 +2344,9 @@ dependencies = [
[[package]]
name = "serde_with_macros"
version = "3.16.1"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c"
checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0"
dependencies = [
"darling",
"proc-macro2",
@@ -2402,9 +2402,6 @@ name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
dependencies = [
"serde",
]
[[package]]
name = "smol"
@@ -2997,7 +2994,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
+1 -1
View File
@@ -30,7 +30,7 @@ hex-literal = "1"
lru-slab = "0.1.2"
log = "0.4"
pin-project-lite = "0.2"
qlog = "0.16"
qlog = "0.17"
rand = "0.9"
rcgen = "0.14"
ring = "0.17"
+5 -10
View File
@@ -580,25 +580,20 @@ impl QlogConfig {
let writer = self.writer?;
let trace = qlog::TraceSeq::new(
qlog::VantagePoint {
self.title.clone(),
self.description.clone(),
None,
Some(qlog::VantagePoint {
name: None,
ty: qlog::VantagePointType::Unknown,
flow: None,
},
self.title.clone(),
self.description.clone(),
Some(qlog::Configuration {
time_offset: Some(0.0),
original_uris: None,
}),
None,
vec![],
);
let mut streamer = QlogStreamer::new(
qlog::QLOG_VERSION.into(),
self.title,
self.description,
None,
self.start_time,
trace,
qlog::events::EventImportance::Core,
+7 -4
View File
@@ -10,7 +10,7 @@ use super::{
use crate::{Duration, Instant, TIMER_GRANULARITY, TransportConfig, congestion, packet::SpaceId};
#[cfg(feature = "qlog")]
use qlog::events::{ExData, quic::MetricsUpdated};
use qlog::events::{ExData, quic::RecoveryMetricsUpdated};
/// Description of a particular network path
pub(super) struct PathData {
@@ -181,7 +181,10 @@ impl PathData {
}
#[cfg(feature = "qlog")]
pub(super) fn qlog_recovery_metrics(&mut self, pto_count: u32) -> Option<MetricsUpdated> {
pub(super) fn qlog_recovery_metrics(
&mut self,
pto_count: u32,
) -> Option<RecoveryMetricsUpdated> {
let controller_metrics = self.congestion.metrics();
let metrics = RecoveryMetrics {
@@ -256,14 +259,14 @@ impl RecoveryMetrics {
}
/// Emit a `MetricsUpdated` event containing only updated values
fn to_qlog_event(&self, previous: &Self) -> Option<MetricsUpdated> {
fn to_qlog_event(&self, previous: &Self) -> Option<RecoveryMetricsUpdated> {
let updated = self.retain_updated(previous);
if updated == Self::default() {
return None;
}
Some(MetricsUpdated {
Some(RecoveryMetricsUpdated {
ex_data: ExData::default(),
min_rtt: updated.min_rtt.map(|rtt| rtt.as_secs_f32()),
smoothed_rtt: updated.smoothed_rtt.map(|rtt| rtt.as_secs_f32()),
+6 -5
View File
@@ -34,7 +34,7 @@ impl QlogStream {
fn emit_event(&self, orig_rem_cid: ConnectionId, event: EventData, now: Instant) {
// Time will be overwritten by `add_event_with_instant`
let mut event = Event::with_time(0.0, event);
event.group_id = Some(orig_rem_cid.to_string());
event.group_id = Some(Box::new(orig_rem_cid.to_string()));
let mut qlog_streamer = self.0.lock().unwrap();
if let Err(e) = qlog_streamer.add_event_with_instant(event, now) {
@@ -79,7 +79,7 @@ impl QlogSink {
return;
};
stream.emit_event(orig_rem_cid, EventData::MetricsUpdated(metrics), now);
stream.emit_event(orig_rem_cid, EventData::QuicMetricsUpdated(metrics), now);
}
}
@@ -106,6 +106,7 @@ impl QlogSink {
..Default::default()
}),
frames: None,
is_mtu_probe_packet: None,
trigger: Some(
match info.time_sent.saturating_duration_since(now) >= loss_delay {
true => PacketLostTrigger::TimeThreshold,
@@ -114,7 +115,7 @@ impl QlogSink {
),
};
stream.emit_event(orig_rem_cid, EventData::PacketLost(event), now);
stream.emit_event(orig_rem_cid, EventData::QuicPacketLost(event), now);
}
}
@@ -143,7 +144,7 @@ impl QlogSink {
..Default::default()
};
stream.emit_event(orig_rem_cid, EventData::PacketSent(event), now);
stream.emit_event(orig_rem_cid, EventData::QuicPacketSent(event), now);
}
}
@@ -170,7 +171,7 @@ impl QlogSink {
..Default::default()
};
stream.emit_event(orig_rem_cid, EventData::PacketReceived(event), now);
stream.emit_event(orig_rem_cid, EventData::QuicPacketReceived(event), now);
}
}
}