-
Notifications
You must be signed in to change notification settings - Fork 581
Added GetParam for Network Statistics #5119
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
Conversation
src/inc/msquic.h
Outdated
uint32_t CongestionWindow; // Congestion Window | ||
uint64_t Bandwidth; // Estimated bandwidth | ||
} NETWORK_STATISTICS; | ||
NETWORK_STATISTICS_INTERNAL NETWORK_STATISTICS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of doing it this way. Since this is the preview features define, we can still change it. So maybe we just have a NETWORK_STATISTICS
as the payload of this local struct. I don't like all the extra stuff you had to put in the NETWORK_STATISTICS_INTERNAL
. It's too messy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the necessary change
1cde3c3
to
2ffe127
Compare
Requesting review on few things in particular
|
2ffe127
to
95382db
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5119 +/- ##
==========================================
+ Coverage 85.93% 86.97% +1.03%
==========================================
Files 59 59
Lines 18048 18086 +38
==========================================
+ Hits 15510 15730 +220
+ Misses 2538 2356 -182 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a3a137e
to
2427212
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. Just a few minor comments.
src/core/connection.c
Outdated
return QUIC_STATUS_INVALID_PARAMETER; | ||
} | ||
|
||
memset(Stats, 0, MinimumStatsSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use CxPlatZeroMemory
509f3ca
to
e104677
Compare
Made the requested changes |
@@ -327,6 +327,7 @@ pub const PARAM_CONN_VERSION_SETTINGS: u32 = 0x05000014; | |||
pub const PARAM_CONN_INITIAL_DCID_PREFIX: u32 = 0x05000015; | |||
pub const PARAM_CONN_STATISTICS_V2: u32 = 0x05000016; | |||
pub const PARAM_CONN_STATISTICS_V2_PLAT: u32 = 0x05000017; | |||
pub const PARAM_CONN_NETWORK_STATISTICS: u32 = 0x05000020; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add here. All these param numbers should be removed here (at some point). We migrated to use ffi mod generated numbers.
Please run cargo build with "--features overwrite" to update rust bindings, the current code is not updated. |
Hi @youyuanwu I have changed all the
I still get one same error (rest are resolved)
Do I need to explicitly register/declare Also, for |
The bindings does not seem to be generated and checked in correctly. Usually I generate the bindings on linux and windows both locally. |
@youyuanwu I have tried the following diff in
With this change it seems I dont need |
This looks good. |
I much prefer this, making the change |
src/core/connection.c
Outdated
@@ -32,6 +32,7 @@ | |||
--*/ | |||
|
|||
#include "precomp.h" | |||
#include "quic_platform.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary, right? I thought precomp already had this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad
My clangd setup aggressively adds includes
Fixed it
Signed-off-by: HHN <harihara.sn@gmail.com>
…K_STATISTICS Signed-off-by: HHN <harihara.sn@gmail.com>
…n type (was previously anon type) Signed-off-by: HHN <harihara.sn@gmail.com>
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Signed-off-by: HHN <harihara.sn@gmail.com>
Signed-off-by: HHN <harihara.sn@gmail.com>
a172c79
to
aad2813
Compare
Description
Currently Network Statistics can not be queried, it is only indicated by
QUIC_CONNECTION_EVENT
.Should I user be forced to subscribe to all the network statistics update events? No
Also, we do not signal the event on every update
This PR proposes a method where the application can query for Network Statistics when it wants to using GetParam
Testing
Added tests similar to
QuicTest_QUIC_PARAM_CONN_STATISTICS*
Documentation
Added documentation for the newly introduced
QUIC_PARAM_CONN_NETWORK_STATISTICS