Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: qlog: move sent_at_time to extension field #1737

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion qlog/src/events/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,18 @@ pub struct PacketSent {

pub trigger: Option<PacketSentTrigger>,

pub send_at_time: Option<f32>,
#[serde(flatten)]
pub extension: PacketSentExtension,

pub frames: Option<SmallVec<[QuicFrame; 1]>>,
}

#[serde_with::skip_serializing_none]
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
pub struct PacketSentExtension {
pub send_at_time: Option<f32>,
}

#[serde_with::skip_serializing_none]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
pub struct PacketDropped {
Expand Down
15 changes: 10 additions & 5 deletions qlog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@
//! supported_versions: None,
//! raw: Some(raw),
//! datagram_id: None,
//! send_at_time: None,
//! extension: qlog::events::quic::PacketSentExtension {
//! send_at_time: None,
//! },
//! trigger: None,
//! });
//!
Expand Down Expand Up @@ -345,7 +347,9 @@
//! supported_versions: None,
//! raw: None,
//! datagram_id: None,
//! send_at_time: None,
//! extension: qlog::events::quic::PacketSentExtension {
//! send_at_time: None,
//! },
//! trigger: None,
//! });
//!
Expand Down Expand Up @@ -718,6 +722,7 @@ pub mod testing {
mod tests {
use super::*;
use crate::events::quic::PacketSent;
use crate::events::quic::PacketSentExtension;
use crate::events::quic::PacketType;
use crate::events::quic::QuicFrame;
use crate::events::EventData;
Expand Down Expand Up @@ -760,7 +765,7 @@ mod tests {
data: None,
}),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down Expand Up @@ -830,7 +835,7 @@ mod tests {
data: None,
}),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down Expand Up @@ -950,7 +955,7 @@ mod tests {
data: None,
}),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down
11 changes: 6 additions & 5 deletions qlog/src/streamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ mod tests {

use super::*;
use crate::events::quic;
use crate::events::quic::PacketSentExtension;
use crate::events::quic::QuicFrame;
use crate::events::RawInfo;
use smallvec::smallvec;
Expand Down Expand Up @@ -303,7 +304,7 @@ mod tests {
supported_versions: None,
raw: raw.clone(),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down Expand Up @@ -334,7 +335,7 @@ mod tests {
supported_versions: None,
raw: raw.clone(),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand All @@ -349,7 +350,7 @@ mod tests {
supported_versions: None,
raw,
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down Expand Up @@ -478,7 +479,7 @@ mod tests {
supported_versions: None,
raw: raw.clone(),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});
let j1 = json!({"foo": "Bar", "hello": 123});
Expand Down Expand Up @@ -506,7 +507,7 @@ mod tests {
supported_versions: None,
raw: raw.clone(),
datagram_id: None,
send_at_time: None,
extension: PacketSentExtension { send_at_time: None },
trigger: None,
});

Expand Down
5 changes: 4 additions & 1 deletion quiche/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4456,7 +4456,10 @@ impl Connection {
supported_versions: None,
raw: Some(qlog_raw_info),
datagram_id: None,
send_at_time: Some(send_at_time),
extension: qlog::events::quic::PacketSentExtension {
send_at_time: Some(send_at_time),
},

trigger: None,
});

Expand Down
Loading