Log the number of workers used to find regressors

This commit is contained in:
Marco Castelluccio 2020-02-18 13:14:06 +01:00
Родитель b47920a3af
Коммит 6b0d778e58
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -426,8 +426,13 @@ class RegressorFinder(object):
zstd_compress(db_path)
db.upload(db_path)
workers = os.cpu_count() + 1
logger.info(
f"Analyzing {len(bug_fixing_commits)} commits using {workers} workers..."
)
with concurrent.futures.ThreadPoolExecutor(
initializer=_init, initargs=(repo_dir,), max_workers=os.cpu_count() + 1
initializer=_init, initargs=(repo_dir,), max_workers=workers
) as executor:
def results():
@ -436,8 +441,6 @@ class RegressorFinder(object):
for bug_fixing_commit in bug_fixing_commits
]
logger.info(f"Analyzing {len(bug_introducing_commit_futures)} commits")
for i, future in enumerate(
tqdm(
concurrent.futures.as_completed(bug_introducing_commit_futures),