Skip to content

Fix wrong duration calculation for asynchronous calls #288

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

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

oliverde8
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #X, partially #Y, mentioned in #Z
Documentation if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
License MIT

What's in this PR?

When using asnyc request, duration is always 0

This fixes that

Why?

Currenly for async request we don't see any duration.
httpplug-async-bug-times-1

First query is synchronous, the other 2 are asynchronous, and are slow. This fixes that

httpplug-async-bug-times-2

Now we can see the duration of asynchronous calls as well

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

Copy link
Collaborator

@dbu dbu left a comment

Choose a reason for hiding this comment

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

thanks for the analysis! i think your solution is correct.

@joelwurtz joelwurtz merged commit b024423 into php-http:master Nov 28, 2018
@joelwurtz
Copy link
Member

Thanks for that, should be better yes

@dbu
Copy link
Collaborator

dbu commented Nov 28, 2018

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.

3 participants