-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Global query time always at 0.00 ms on profiler #52881
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
Outdated
Show resolved
Hide resolved
Can you please rebase the PR on 6.4 to change the annotation there instead? |
Thanks for the feedback, will do the rebase 👍 |
Yes, please keep the test! |
Thank you @maximethiry. |
Done. |
(original explanation made from 7.0 branch, now targeting 6.4 cf comments)
The related issue, when i explained the possible solution : #52880
On
Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector
, updated the native return type fromint
tofloat
for the methodgetTime
.Context :
Inside this method, the value of
$time
was always a float smaller than 0. The transition to native return type (which was correct regarding to old phpdoc type) made the return cast int to the floating value, hence returning always 0.I updated the return type to float and updated the test to check for the calculus on floating values.
I had to switch to usleep instead of sleep, since the value might not be an int.