Drop giving the run time while it is running

We give an overview of the time for the different steps at the end, so
no need to give it in the middle

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2019-11-25 12:59:33 +01:00
parent b3f348c94e
commit 9b3b02b4ac

View file

@ -851,10 +851,7 @@ class DistgitBugzillaSync:
if not self.pagure_projects:
return
if self.env["verbose"]:
times["data structure end"] = time.time()
delta = times["data structure end"] - times["start"]
print("Ran for %s seconds -- ie: %.2f minutes" % (delta, delta/60.0))
times["data structure end"] = time.time()
# Initialize the connection to bugzilla
bugzilla = BugzillaProxy(
@ -865,18 +862,14 @@ class DistgitBugzillaSync:
pre_cache_users=not self.args.projects or self.args.print_fas_names,
)
times["FAS cache building end"] = time.time()
if self.env["verbose"]:
times["FAS cache building end"] = time.time()
delta = times["FAS cache building end"] - times["data structure end"]
print(f"Ran for {delta} seconds -- ie: {delta/60} minutes")
print("Building bugzilla's products in-memory cache")
bugzilla.build_product_cache(self.pagure_projects)
times["BZ cache building end"] = time.time()
if self.env["verbose"]:
times["BZ cache building end"] = time.time()
delta = times["BZ cache building end"] - times["FAS cache building end"]
print(f"Ran for {delta} seconds -- ie: {delta/60} minutes")
if self.env["dryrun"]:
print("Querying bugzilla but not doing anything")
else: