Skip to content

Commit 17ac38a

Browse files
authored
Add progress bars in a couple of places that seem to be slow in the new deployment (#5391)
1 parent 1ff5cc5 commit 17ac38a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bugbug/repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ def download_commits(
14071407

14081408
get_component_mapping()
14091409

1410-
commits = tuple(transform(hg, repo_dir, c) for c in commits)
1410+
commits = tuple(transform(hg, repo_dir, c) for c in tqdm(commits))
14111411

14121412
close_component_mapping()
14131413

http_service/bugbug_http/boot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import hglib
1212
import requests
1313
import tenacity
14+
from tqdm import tqdm
1415

1516
from bugbug import repository, test_scheduling, utils
1617
from bugbug_http import ALLOW_MISSING_MODELS, REPO_DIR
@@ -161,7 +162,8 @@ def retrieve_schedulable_tasks() -> None:
161162
# Update the commits DB.
162163
logger.info("Browsing all commits...")
163164
nodes = collections.deque(
164-
(commit["node"] for commit in repository.get_commits()), maxlen=4096
165+
(commit["node"] for commit in tqdm(repository.get_commits())),
166+
maxlen=4096,
165167
)
166168
nodes.reverse()
167169
logger.info("All commits browsed.")

0 commit comments

Comments
 (0)