refactor: remove logical_seq from client events, session tracking and stats usage
It was an attempt at handling integer wraparound more cleanly keeping in mind that we have a continuous mode, and so we can more easily reach seq > u32::MAX However after running the numbers, if we run with a interval of 10ms, it's still gonna take ~497 days before we hit integer overflow, so for now it doesn't seem worth to have this extra logic to handle something that'll in 99.9% of cases be purely an edge case Keeping in mind autorate usage, in sqm-autorate-rust each send loop is 500 ms by default, and the sleep is then 500 ms / 5 reflectors, so our interval is 100 ms. that means it'll take 4970 days or ~13.6 years to reach the limit. Not worth dealing with IMO
This commit was merged in pull request #11.
This commit is contained in:
1 parent
8ef53c999a
commit
7ad83ca1f6
13 files changed
+117
-273
No files matched your search
@@ -41,7 +41,6 @@ pub enum ClientEvent {
|
||||
|
||||
EchoSent {
|
||||
seq: u32,
|
||||
logical_seq: u64,
|
||||
remote: SocketAddr,
|
||||
scheduled_at: Instant,
|
||||
sent_at: ClientTimestamp,
|
||||
@@ -52,7 +51,6 @@ pub enum ClientEvent {
|
||||
|
||||
EchoReply {
|
||||
seq: u32,
|
||||
logical_seq: u64,
|
||||
remote: SocketAddr,
|
||||
sent_at: ClientTimestamp,
|
||||
received_at: ClientTimestamp,
|
||||
@@ -66,7 +64,6 @@ pub enum ClientEvent {
|
||||
|
||||
EchoLoss {
|
||||
seq: u32,
|
||||
logical_seq: u64,
|
||||
sent_at: ClientTimestamp,
|
||||
timeout_at: std::time::Instant,
|
||||
},
|
||||
@@ -80,7 +77,6 @@ pub enum ClientEvent {
|
||||
|
||||
LateReply {
|
||||
seq: u32,
|
||||
logical_seq: Option<u64>,
|
||||
highest_seen: u32,
|
||||
remote: SocketAddr,
|
||||
sent_at: Option<ClientTimestamp>,
|
||||
|
||||
Reference in new issue
Block a user