Skip to content

Commit d0adadf

Browse files
wilkinsonasbrannen
authored andcommitted
Capture maxParallelForks of Test tasks in build scans
The parallel forks configuration of Test tasks can have a big impact on their execution time. This commit updates the build can configuration to capture each Test task's maxParallelForks configuration as custom values in the build scan. This will make this data available when comparing scans which will be useful as we experiment with different parallel fork settings to reduce the build's overall execution time. Closes gh-23691
1 parent 2570379 commit d0adadf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gradle/build-scan-user-data.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ tagIde()
33
tagCiOrLocal()
44
addCiMetadata()
55
addGitMetadata()
6+
addTestTaskMetadata()
67

78
void tagOs() {
89
buildScan.tag System.getProperty('os.name')
@@ -49,6 +50,16 @@ void addCiMetadata() {
4950
}
5051
}
5152

53+
void addTestTaskMetadata() {
54+
allprojects {
55+
tasks.withType(Test) { test ->
56+
doFirst {
57+
buildScan.value "Test#maxParallelForks[${test.path}]", test.maxParallelForks.toString()
58+
}
59+
}
60+
}
61+
}
62+
5263
boolean isCi() {
5364
isBamboo()
5465
}

0 commit comments

Comments
 (0)