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 Issues with BandwidthMeasurementEngine stop method and Performance API #24

Closed
wants to merge 3 commits into from

Conversation

bekmuradov
Copy link

After receiving the fetch response, create another performance entry using performance.mark() and performance.measure() to calculate the duration of the request.
@vasturiano
Copy link
Contributor

@bekmuradov thanks for making this PR.

The first issue has just been fixed in this PR: #27

As for the second, it is the responsibility of the underlying fetch library to do all the performance marks required for the durations to be calculated correctly. In fact, only that lower level lib would be aware about the different request phases of dns, tcp handshake, request, response, etc.

If you're getting an empty getEntriesByName() it's most likely because the underlying fetch used is not doing these marks correctly, or at all, as is the case with node. Being one of the reasons why this module cannot currently be used in a node-based CLI. More info on this issue: #17 (comment).

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