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

fix(har): account for reused sockets #33087

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Oct 14, 2024

Closes #32960

If the socket is reused, the connect and DNS timings are set to -1, because that timing doesn't apply to the current request. The time between request start and the socket being free is counted as blocked.

@Skn0tt Skn0tt requested a review from dgozman October 14, 2024 10:07
@Skn0tt Skn0tt self-assigned this Oct 14, 2024

This comment has been minimized.

tcpConnectionAt ??= happyEyeBallsTimings.tcpConnectionAt;
if (request.reusedSocket) {
reusedSocketAt = monotonicTime();
dnsLookupAt = startAt;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps set both dnsLookupAt and tcpConnectionAt to undefined? Would that make the code cleaner?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I've refactored it a little more, how do you like that?

Copy link
Contributor

Test results for "tests 1"

1 flaky ⚠️ [chromium-page] › page/page-event-popup.spec.ts:149:3 › should not treat navigations as new popups @ubuntu-20.04-chromium-tip-of-tree

35870 passed, 620 skipped
✔️✔️✔️

Merge workflow run.

@Skn0tt Skn0tt merged commit a8df750 into microsoft:main Oct 14, 2024
29 checks passed
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.

[internal] Investigate fetch timings when Socket is reused
2 participants