-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add miliseconds do the test time output #12729
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 doesn't seem to work properly:
|
65d36d4
to
25c8ac4
Compare
816bad9
to
ae56a49
Compare
This breaks on 32-bit. https://github.com/php/php-src/actions/runs/7367562603/job/20050980094 |
TBH this change seems questionable. What are we actually measuring here? For short tests, the actual test execution time will be dwarfed by the creation of potentially multiple processes (skipif, test, cleanup) and PHP startup. For longer tests, milliseconds aren't meaningful. |
Sorry for breaking. I have pushed the fix for this issue: #13064 The reason for the change was that we run short tests we get the output If you think this doesn't bring any value I'm fine with reverting changes by myself or anyone else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If confusion is an actual problem, a simple fix might've been making the script say "<1 seconds".
Note that a completely empty test (<?php ?>
) still takes 0.024 seconds on my machine. As such, milliseconds don't seem useful. Anyway, I don't care too much because that number is mostly irrelevant to me. It's just obviously important that 32-bit continues working.
{ | ||
echo "=====================================================================\nTIME END " . date('Y-m-d H:i:s', $end_time) . "\n"; | ||
echo "=====================================================================\nTIME END " . date('Y-m-d H:i:s', $start_timestamp + (int)(($end_time - $start_time)/1e9)) . "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look correct. $start_timestamp
is rounded down. The end time can still be $start_timestamp + 1
, even if ($end_time - $start_time) < 1
. I don't understand why this was changed at all.
This PR adds the fractional part (3 digits) of the time taken by tests to the test output.