Update bunches to include performanceTest config

This commit is contained in:
Simon Ogorodnik
2018-06-20 21:48:37 +03:00
parent 0ac32ae41b
commit e20ee0205a
3 changed files with 153 additions and 0 deletions
+51
View File
@@ -115,6 +115,26 @@ sourceSets {
"idea-live-templates/tests"
)
}
}
val performanceTestCompile by configurations.creating {
extendsFrom(configurations["testCompile"])
}
val performanceTestRuntime by configurations.creating {
extendsFrom(configurations["testRuntime"])
}
val performanceTest by run {
val sourceSets = javaPluginConvention().sourceSets
sourceSets.creating {
compileClasspath += sourceSets["test"].output
compileClasspath += sourceSets["main"].output
runtimeClasspath += sourceSets["test"].output
runtimeClasspath += sourceSets["main"].output
java.srcDirs("performanceTests")
}
}
projectTest {
@@ -122,6 +142,37 @@ projectTest {
workingDir = rootDir
}
projectTest(taskName = "performanceTest") {
dependsOn(":dist")
dependsOn(performanceTest.output)
testClassesDirs = performanceTest.output.classesDirs
classpath = performanceTest.runtimeClasspath
workingDir = rootDir
jvmArgs?.removeAll { it.startsWith("-Xmx") }
maxHeapSize = "3g"
jvmArgs("-XX:SoftRefLRUPolicyMSPerMB=50")
jvmArgs(
"-XX:ReservedCodeCacheSize=240m",
"-XX:+UseCompressedOops",
"-XX:+UseConcMarkSweepGC"
)
jvmArgs("-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder")
if (hasProperty("perf.flight.recorder.override")) {
jvmArgs(property("perf.flight.recorder.override"))
} else {
val settings = if (hasProperty("perf.flight.recorder.settings")) ",settings=${property("perf.flight.recorder.settings")}" else ""
jvmArgs("-XX:StartFlightRecording=delay=15m,duration=5h,filename=perf.jfr$settings")
}
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar {}
classesDirsArtifact()
+51
View File
@@ -116,6 +116,26 @@ sourceSets {
"idea-live-templates/tests"
)
}
}
val performanceTestCompile by configurations.creating {
extendsFrom(configurations["testCompile"])
}
val performanceTestRuntime by configurations.creating {
extendsFrom(configurations["testRuntime"])
}
val performanceTest by run {
val sourceSets = javaPluginConvention().sourceSets
sourceSets.creating {
compileClasspath += sourceSets["test"].output
compileClasspath += sourceSets["main"].output
runtimeClasspath += sourceSets["test"].output
runtimeClasspath += sourceSets["main"].output
java.srcDirs("performanceTests")
}
}
projectTest {
@@ -123,6 +143,37 @@ projectTest {
workingDir = rootDir
}
projectTest(taskName = "performanceTest") {
dependsOn(":dist")
dependsOn(performanceTest.output)
testClassesDirs = performanceTest.output.classesDirs
classpath = performanceTest.runtimeClasspath
workingDir = rootDir
jvmArgs?.removeAll { it.startsWith("-Xmx") }
maxHeapSize = "3g"
jvmArgs("-XX:SoftRefLRUPolicyMSPerMB=50")
jvmArgs(
"-XX:ReservedCodeCacheSize=240m",
"-XX:+UseCompressedOops",
"-XX:+UseConcMarkSweepGC"
)
jvmArgs("-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder")
if (hasProperty("perf.flight.recorder.override")) {
jvmArgs(property("perf.flight.recorder.override"))
} else {
val settings = if (hasProperty("perf.flight.recorder.settings")) ",settings=${property("perf.flight.recorder.settings")}" else ""
jvmArgs("-XX:StartFlightRecording=delay=15m,duration=5h,filename=perf.jfr$settings")
}
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar {}
classesDirsArtifact()
+51
View File
@@ -116,6 +116,26 @@ sourceSets {
"idea-live-templates/tests"
)
}
}
val performanceTestCompile by configurations.creating {
extendsFrom(configurations["testCompile"])
}
val performanceTestRuntime by configurations.creating {
extendsFrom(configurations["testRuntime"])
}
val performanceTest by run {
val sourceSets = javaPluginConvention().sourceSets
sourceSets.creating {
compileClasspath += sourceSets["test"].output
compileClasspath += sourceSets["main"].output
runtimeClasspath += sourceSets["test"].output
runtimeClasspath += sourceSets["main"].output
java.srcDirs("performanceTests")
}
}
projectTest {
@@ -123,6 +143,37 @@ projectTest {
workingDir = rootDir
}
projectTest(taskName = "performanceTest") {
dependsOn(":dist")
dependsOn(performanceTest.output)
testClassesDirs = performanceTest.output.classesDirs
classpath = performanceTest.runtimeClasspath
workingDir = rootDir
jvmArgs?.removeAll { it.startsWith("-Xmx") }
maxHeapSize = "3g"
jvmArgs("-XX:SoftRefLRUPolicyMSPerMB=50")
jvmArgs(
"-XX:ReservedCodeCacheSize=240m",
"-XX:+UseCompressedOops",
"-XX:+UseConcMarkSweepGC"
)
jvmArgs("-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder")
if (hasProperty("perf.flight.recorder.override")) {
jvmArgs(property("perf.flight.recorder.override"))
} else {
val settings = if (hasProperty("perf.flight.recorder.settings")) ",settings=${property("perf.flight.recorder.settings")}" else ""
jvmArgs("-XX:StartFlightRecording=delay=15m,duration=5h,filename=perf.jfr$settings")
}
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar {}
classesDirsArtifact()