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

add support to log rtt #1522

Merged
merged 9 commits into from
Jan 25, 2024
Merged

add support to log rtt #1522

merged 9 commits into from
Jan 25, 2024

Conversation

KershawChang
Copy link
Collaborator

Maybe it's worth to also log RTT.

@KershawChang KershawChang marked this pull request as draft December 19, 2023 09:15
Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

Logging on packet send rather than when we update the value (which is when we receive an ACK) seems like we'll log more often than is necessary.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (64fb41f) 87.63% compared to head (1cd1543) 87.54%.
Report is 15 commits behind head on main.

Files Patch % Lines
neqo-transport/src/rtt.rs 0.00% 10 Missing ⚠️
neqo-transport/src/cc/classic_cc.rs 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1522      +/-   ##
==========================================
- Coverage   87.63%   87.54%   -0.09%     
==========================================
  Files         117      118       +1     
  Lines       38323    38497     +174     
==========================================
+ Hits        33584    33704     +120     
- Misses       4739     4793      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KershawChang
Copy link
Collaborator Author

Logging on packet send rather than when we update the value (which is when we receive an ACK) seems like we'll log more often than is necessary.

Agreed. We should only log when it's changed.

@KershawChang KershawChang marked this pull request as ready for review January 22, 2024 21:18
@KershawChang
Copy link
Collaborator Author

Logging on packet send rather than when we update the value (which is when we receive an ACK) seems like we'll log more often than is necessary.

I've decided to log rtts in on_packets_acked. The main reason is that there could be multiple ClassicCongestionControl objects in a log and we need to link rtt information and the other information in ClassicCongestionControl together.
Please take another look. Thanks.

martinthomson
martinthomson previously approved these changes Jan 23, 2024
Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

A simplification might be in order, but this is OK otherwise.

Comment on lines 167 to 169
min_rtt: Duration,
latest_rtt: Duration,
smooth_rtt: Duration,
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why this can't be passed &RttEstimate? The function is called from Path::on_packets_acked(), so I think that is much easier. Then your logging calls might just invoke the Debug implementation on RttEstimate (which might need to be improved, as it uses the default).

Copy link
Member

Choose a reason for hiding this comment

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

Your tests can probably build a const RTT_ESTIMATE.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. This is neat.
I'll do this.

@KershawChang
Copy link
Collaborator Author

I've addressed the comment again.
Please take another look. Thanks!

martinthomson
martinthomson previously approved these changes Jan 24, 2024
@martinthomson
Copy link
Member

@larseggert, do you want to review this? If not, would you mind merging it?

larseggert
larseggert previously approved these changes Jan 25, 2024
Copy link
Collaborator

@larseggert larseggert left a comment

Choose a reason for hiding this comment

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

LGTM, but suggest renaming rtts -> rtt_est for clarity.

@KershawChang KershawChang dismissed stale reviews from larseggert and martinthomson via 72926e0 January 25, 2024 08:50
@KershawChang
Copy link
Collaborator Author

I assume I can just merge this PR, since the change after last review was addressing some nits.

@KershawChang KershawChang merged commit b164ab0 into mozilla:main Jan 25, 2024
9 checks passed
@KershawChang KershawChang deleted the add_rtt_log branch January 25, 2024 09:04
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.

4 participants