Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedDec 4, 2023
Can you please rebase the PR on 6.4 to change the annotation there instead? |
maximethiry commentedDec 5, 2023
Thanks for the feedback, will do the rebase 👍 |
derrabus commentedDec 5, 2023
Yes, please keep the test! |
derrabus commentedDec 22, 2023
Thank you@maximethiry. |
derrabus commentedDec 22, 2023
Done. |
Uh oh!
There was an error while loading.Please reload this page.
(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 frominttofloatfor the methodgetTime.Context :
Inside this method, the value of
$timewas 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.