Print how long it took for the script to run in verbose mode
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
71b7245439
commit
f925d6424e
1 changed files with 5 additions and 0 deletions
|
@ -636,6 +636,7 @@ def _to_legacy_schema(product_and_project_and_summary, session=None):
|
|||
def main():
|
||||
"""The entrypoint to the script."""
|
||||
global VERBOSE, DRYRUN, projects_dict
|
||||
start = time.time()
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Script syncing information between Pagure and bugzilla'
|
||||
|
@ -801,6 +802,10 @@ def main():
|
|||
with open(DATA_CACHE, 'w') as stream:
|
||||
json.dump({}, stream)
|
||||
|
||||
if VERBOSE:
|
||||
delta = time.time() - start
|
||||
print("Ran for %s seconds -- ie: %.2f minutes" % (delta, delta/60.0))
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue