-
Notifications
You must be signed in to change notification settings - Fork 218
Print total runtime of all builds #5032
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -45,6 +45,7 @@ | |||||
| import sys | ||||||
| import tempfile | ||||||
| import traceback | ||||||
| from datetime import datetime | ||||||
|
|
||||||
| # IMPORTANT this has to be the first easybuild import as it customises the logging | ||||||
| # expect missing log output when this not the case! | ||||||
|
|
@@ -84,6 +85,7 @@ | |||||
| from easybuild.tools.repository.repository import init_repository | ||||||
| from easybuild.tools.systemtools import check_easybuild_deps | ||||||
| from easybuild.tools.testing import create_test_report, overall_test_report, regtest, session_state | ||||||
| from easybuild.tools.utilities import time2str | ||||||
| from easybuild.tools.version import EASYBLOCKS_VERSION, FRAMEWORK_VERSION, UNKNOWN_EASYBLOCKS_VERSION | ||||||
| from easybuild.tools.version import different_major_versions | ||||||
|
|
||||||
|
|
@@ -585,6 +587,7 @@ def process_eb_args(eb_args, eb_go, cfg_settings, modtool, testing, init_session | |||||
| return True | ||||||
|
|
||||||
| # build software, will exit when errors occurs (except when testing) | ||||||
| start_time = datetime.now() | ||||||
| if not testing or (testing and do_build): | ||||||
| exit_on_failure = not (options.dump_test_report or options.upload_test_report) | ||||||
|
|
||||||
|
|
@@ -601,7 +604,7 @@ def process_eb_args(eb_args, eb_go, cfg_settings, modtool, testing, init_session | |||||
| success_msg = "Build succeeded " | ||||||
| if build_option('ignore_test_failure'): | ||||||
| success_msg += "(with --ignore-test-failure) " | ||||||
| success_msg += "for %s out of %s" % (correct_builds_cnt, len(ordered_ecs)) | ||||||
| success_msg += f"for {correct_builds_cnt} out of {len(ordered_ecs)} in {time2str(datetime.now() - start_time)}" | ||||||
|
||||||
| success_msg += f"for {correct_builds_cnt} out of {len(ordered_ecs)} in {time2str(datetime.now() - start_time)}" | |
| success_msg += f"for {correct_builds_cnt} out of {len(ordered_ecs)} (total: {time2str(datetime.now() - start_time)})" |
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.
Maybe we could use the same style as other time reporting eg for the steps of
... (took TIME)?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.
Like this?
Not sure of this format here could be confused for something else and it was easier. It would need a 2nd
print_msgto have it match more closely the other messages:But no strong opinion, can change it if you think one is better (which one?)
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.
I'd be fine also having it on one line, maybe we could do something like
Also no strong opinion on it (could always be adjusted later) but agree it would be nice to have the total runtime of the build as well.
Maybe for a separate PR, but related to this it might also be worth to get a total CPU/node time for parallel jobs