Time the time it takes to build the bugzilla cache
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
4c697a63ce
commit
4833e4a566
1 changed files with 13 additions and 2 deletions
|
@ -676,12 +676,19 @@ class DistgitBugzillaSync:
|
|||
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)
|
||||
|
||||
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:
|
||||
print("Updating bugzilla")
|
||||
|
||||
bugzilla.build_product_cache(self.pagure_projects)
|
||||
for project in sorted(self.pagure_projects, key=itemgetter('name')):
|
||||
for product in project["products"]:
|
||||
if product not in self.env['products']:
|
||||
|
@ -754,8 +761,12 @@ class DistgitBugzillaSync:
|
|||
delta = times["FAS cache building end"] - times["data structure end"]
|
||||
print(f" Ran on {delta:.2f} seconds -- ie: {delta/60:.2f} minutes")
|
||||
|
||||
print("Building the bugzilla cache")
|
||||
delta = times["BZ cache building end"] - times["FAS cache building end"]
|
||||
print(f" Ran on {delta:.2f} seconds -- ie: {delta/60:.2f} minutes")
|
||||
|
||||
print("Interacting with bugzilla")
|
||||
delta = times["end"] - times["FAS cache building end"]
|
||||
delta = times["end"] - times["BZ cache building end"]
|
||||
print(f" Ran on {delta:.2f} seconds -- ie: {delta/60:.2f} minutes")
|
||||
|
||||
print("Total")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue