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

Maintain DATAGRAM sent/received statistics #1827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hendrikcech
Copy link

This PR tracks the number of sent and received DATAGRAM frames on the connection-level and on individual paths. It provides more visibility into what has been transferred over the connection. Currently only the number of sent and received packets is tracked.

@hendrikcech hendrikcech requested a review from a team as a code owner July 30, 2024 14:59
Comment on lines +1412 to +1415
dgram_sent_count: usize,

/// Total number of received DATAGRAM frames.
dgram_recv_count: usize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, in theory its possible for a minimally encoded length-prefixed DATAGRAM to take about 2 bytes and therefore a single packet to contain a lot of them. For a standard MTU, this would be like 600-700 but larger MTUs are possible. Therefore, there's a risk that the limit here could be breached orders of magnitude before the QUIC connection hit its packet count limit.

Not sure if that warrants a saturating_add on the counting but wanted to flag before I forgot.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I changed += 1 to saturating_add(1) and rebased the commit on top of master.

@hendrikcech hendrikcech force-pushed the pr_dgram_stats branch 3 times, most recently from bd24bc9 to 6b56e30 Compare December 2, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants