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

core(network-analyzer): fix num of roundtrips for h3 estimates #15102

Merged
merged 2 commits into from
May 24, 2023

Conversation

connorjclark
Copy link
Collaborator

Minor thing I noticed.

once #15091 lands we can probably delete all these estimates, but we'll probably first want to get the ssl timing from LR working. Until then, here's a quick fix to not include one too many roundtrips in these estimates for h3.

@connorjclark connorjclark requested a review from a team as a code owner May 22, 2023 20:17
@connorjclark connorjclark requested review from brendankenny and removed request for a team May 22, 2023 20:17
@@ -194,7 +194,8 @@ class NetworkAnalyzer {

// Assume everything before sendStart was just DNS + (SSL)? + TCP handshake
// 1 RT for DNS, 1 RT (maybe) for SSL, 1 RT for TCP
let roundTrips = 2;
let roundTrips = 1;
if (!record.protocol.startsWith('h3')) roundTrips += 1; // TCP
Copy link
Member

Choose a reason for hiding this comment

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

We should add this logic to TTFB as well.

WDYT about adding some kind of getRoundTripCount helper function to NetworkRequest so that we don't have to maintain this in 3 different places?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a bit more complicated than first glance to share this code, since the analyzer has its own concept of "is this connection reused?". I can try in a followup.

@connorjclark connorjclark changed the title core(network-analyzer): fix roundtrips in h3 fallback rtt estimates core(network-analyzer): fix num of roundtrips for h3 estimates May 24, 2023
@connorjclark connorjclark merged commit d0233f5 into main May 24, 2023
@connorjclark connorjclark deleted the h3-estimates branch May 24, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants