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

Incorrect displayed/calculated response time of request? #123

Closed
marcvanbreemen opened this issue Dec 5, 2024 · 3 comments
Closed

Incorrect displayed/calculated response time of request? #123

marcvanbreemen opened this issue Dec 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@marcvanbreemen
Copy link

Describe the bug
If I use an other API client like Yaak or RapidAPI and test on an https endpoint (with just an empty html file) I get response times of around 40-50 ms.

If I test the exact same endpoint in JetClient then it says 8 ms, which seems far to low. That cannot be correct as a total response time.

Steps to reproduce
Test the same endpoint in different API clients.

Expected behavior
A higher reported response time.

If possible divided in different parts; eg. time for SSL handshake and time for actual response.

Environment information:

  • OS: Windows 11 / macOS
  • IDE version: latest
  • plugin version: latest
@marcvanbreemen marcvanbreemen added the bug Something isn't working label Dec 5, 2024
@AntonShuvaev
Copy link
Collaborator

Hi @marcvanbreemen,

Thanks for reporting this issue! I’ve updated the response time calculation to include the time it takes to establish the connection and added a tooltip for the response time. The tooltip shows a breakdown of Connection Establishing Time and Server Response Time. This fix will be available in the next version.

Just to note, JetClient, like Postman, reuses connections. This means the first request to an endpoint might take longer due to connection setup, while subsequent requests are faster because the connection is reused. On the other hand, Yaak and RapidAPI don’t seem to reuse connections, which explains why their times are consistently higher for all requests.

@marcvanbreemen
Copy link
Author

Hi @AntonShuvaev ,

Nice!

I like the details of RapidAPI in Mac version; especially knowing how much time the handshake needs.

The reuse of the connection could be good, but for my personal test purposes I think an option to not reuse it would be nice, because I want to be able to always see how long the total request actually takes.

@AntonShuvaev
Copy link
Collaborator

I’ve released a fix with updated time measurement and a tooltip showing Connection Establishing Time and Server Response Time. For a more detailed breakdown of response times, I’ve created a separate issue: #125. However, I can’t promise it will be implemented soon.

If you want to disable connection reuse for testing purposes, you can add the header Connection: Close to your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants