Skip to content

Commit d9bb009

Browse files
committed
Log CPU, test maxParallelForks, and Gradle maxWorkers on projectsEvaluated
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
1 parent fd1f3ac commit d9bb009

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ ext {
5454

5555
}
5656

57+
gradle.projectsEvaluated {
58+
int processors = Runtime.runtime.availableProcessors()
59+
int testForks = processors.intdiv(2) ?: 1
60+
int maxWorkers = gradle.startParameter.maxWorkerCount
61+
String workersLabel = maxWorkers > 0 ? String.valueOf(maxWorkers) : "default (~${processors})"
62+
rootProject.logger.lifecycle(
63+
"Parallelism: {} processors (Runtime), test maxParallelForks={}, Gradle maxWorkers={}",
64+
processors, testForks, workersLabel)
65+
}
66+
5767
allprojects {
5868
group = 'org.springframework.kafka'
5969

0 commit comments

Comments
 (0)