Browse Source

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
pull/23692/head
Andy Wilkinson 5 years ago committed by Sam Brannen
parent
commit
d0adadf3ca
  1. 11
      gradle/build-scan-user-data.gradle

11
gradle/build-scan-user-data.gradle

@ -3,6 +3,7 @@ tagIde() @@ -3,6 +3,7 @@ tagIde()
tagCiOrLocal()
addCiMetadata()
addGitMetadata()
addTestTaskMetadata()
void tagOs() {
buildScan.tag System.getProperty('os.name')
@ -49,6 +50,16 @@ void addCiMetadata() { @@ -49,6 +50,16 @@ void addCiMetadata() {
}
}
void addTestTaskMetadata() {
allprojects {
tasks.withType(Test) { test ->
doFirst {
buildScan.value "Test#maxParallelForks[${test.path}]", test.maxParallelForks.toString()
}
}
}
}
boolean isCi() {
isBamboo()
}

Loading…
Cancel
Save