summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-11-22 13:41:48 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-11-22 13:30:18 +0000
commitf93a7369657814206bfbce49817c8fbd9a1bfcba (patch)
treec4342d92c00bf5717e1c632d096cd4ea491f2053
parentf30dfc1e68ca48c332ca11e6c6c2d4d167fb978e (diff)
Build scripts: Print elapsed time
Change-Id: Ifdacba5202c573192b57a834df510776597ccf61 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--build_scripts/main.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index b57e4978..ad6cc04a 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -50,14 +50,17 @@ setup_script_dir = os.getcwd()
build_scripts_dir = os.path.join(setup_script_dir, 'build_scripts')
setup_py_path = os.path.join(setup_script_dir, "setup.py")
+start_time = int(time.time())
+
+def elapsed():
+ return int(time.time()) - start_time
+
@memoize
def get_package_timestamp():
""" In a Coin CI build the returned timestamp will be the
Coin integration id timestamp. For regular builds it's
just the current timestamp or a user provided one."""
- if OPTION_PACKAGE_TIMESTAMP:
- return OPTION_PACKAGE_TIMESTAMP
- return int(time.time())
+ return OPTION_PACKAGE_TIMESTAMP if OPTION_PACKAGE_TIMESTAMP else start_time
@memoize
def get_package_version():
@@ -347,7 +350,7 @@ class PysideInstall(_install):
def run(self):
_install.run(self)
- log.info('*** Install completed')
+ log.info('*** Install completed ({}s)'.format(elapsed()))
class PysideDevelop(_develop):
@@ -725,7 +728,7 @@ class PysideBuild(_build):
_build.run(self)
else:
log.info("Skipped preparing and building packages.")
- log.info('*** Build completed')
+ log.info('*** Build completed ({}s)'.format(elapsed()))
def log_pre_build_info(self):
if config.is_internal_shiboken_generator_build_and_part_of_top_level_all():