-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: change duration_ms to duration #7133
Conversation
LGTM |
1 similar comment
LGTM |
@jasnell I can't imagine how this could cause tests to fail, but is it worth running a test-commit on it anyway? |
Of course :-): https://ci.nodejs.org/job/node-test-pull-request/2914/ |
@@ -310,7 +310,7 @@ def HasRun(self, output): | |||
(duration.seconds + duration.days * 24 * 3600) * 10**6) / 10**6 | |||
|
|||
logger.info(' ---') | |||
logger.info(' duration_ms: %d.%d' % (total_seconds, duration.microseconds / 1000)) | |||
logger.info(' duration: %d.%d' % (total_seconds, duration.microseconds / 1000)) |
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.
should this be duration: %d.%ds
? (where s
denotes seconds)?
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.
That would definitely make sense.
Updated as per @Fishrock123's suggestion, PTAL. |
The test script (tools/test.py) logs duration as "duration_ms: x.y". This is confusing (as the duration is measured in seconds). New example output: duration: 0.212s
LGTM |
1 similar comment
LGTM |
The test script (tools/test.py) logs duration as "duration_ms: x.y". This is confusing (as the duration is measured in seconds). New example output: duration: 0.212s PR-URL: #7133 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Landed in d413378 |
Reversion filed at #7214, sorry to be a party-pooper and for catching this late, but at least now it'll stick in more than just my head when it inevitably comes up in the future:
|
The test script (tools/test.py) logs duration as "duration_ms: x.y". This is confusing (as the duration is measured in seconds). New example output: duration: 0.212s PR-URL: #7133 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Checklist
Affected core subsystem(s)
test
Description of change
The test script (tools/test.py) logs duration as "duration_ms: x.y" this is confusing (as the duration is measured in seconds). This PR changes
duration_ms
toduration
. It's a small change, but theduration_ms
causes a lot of confusion to people who are new to the tests.The only other use of
duration_ms
in the codebase is in test/cctest/test-cpu-profiler.cc which I don't think should be affected by this change.For background see @rvagg's comment - #2393 (comment)