Skip to content

Commit 1137e86

Browse files
committed
bot: Log number of workers to generate commit coverage mapping
1 parent 4ca3b82 commit 1137e86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bot/code_coverage_bot/commit_coverage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,13 @@ def analyze_changeset(changeset_to_analyze: str) -> None:
123123
"unknown": sum(c["lines_unknown"] for c in coverage["paths"].values()),
124124
}
125125

126+
max_workers = min(32, (os.cpu_count() or 1) + 4)
127+
logger.info(f"Analyzing {len(changesets_to_analyze)} with {max_workers} workers")
128+
126129
with ThreadPoolExecutorResult(
127130
initializer=_init_thread, initargs=(repo_dir,)
128131
) as executor:
132+
129133
futures = [
130134
executor.submit(analyze_changeset, changeset)
131135
for changeset in changesets_to_analyze

0 commit comments

Comments
 (0)