We have a build which runs around 1300 unit tests. Under ant, all the tests run and pass in ~45 minutes. Under gradle, they can take over 2 hours. During the first 800 or so tests, the VM executing the tests consumes 200-300% CPU on a 16-core machine. Later in the testing run, the test VM consumes ~20-30% CPU and the Gradle daemon is consuming 160-190% CPU.
I've run with -i and -d and there is quite a bit of output indicating communication between the various Gradle processes but nothing that seems to obviously indicate the problem. The test task is defined in our build.gradle as: test { maxHeapSize "4g" jvmArgs '-server', '-Xmx4g', '-XX:MaxPermSize=256m' testLogging.showStandardStreams = false include "**/UT_*" } It's unclear to me if the maxHeap arg and the jvmArgs '-Xmx4g' are duplicate args but the maxHeap arg was added because of a separate issue in which DefaultTestReport.mergeFromFiles crashes with OutOfMemory error while attempting to merge ~300 MB of test result XML's. This issue is currently happening with gradle M6. I'll test with M7 as well. -- View this message in context: http://gradle.1045684.n5.nabble.com/Gradle-daemon-160-CPU-usage-during-long-test-run-tp5124315p5124315.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email