You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/03/12 02:51:34 UTC
[groovy] branch GROOVY_2_5_X updated: rework broken performance subproject which hasn't been used much for a long time
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
new 89fc928 rework broken performance subproject which hasn't been used much for a long time
89fc928 is described below
commit 89fc9289ddeb40b658a14e36521a83cb78d7d484
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Mar 12 12:51:17 2022 +1000
rework broken performance subproject which hasn't been used much for a long time
---
build.gradle | 1 +
subprojects/groovy-test/build.gradle | 2 +-
subprojects/performance/build.gradle | 31 ++++++++++++++++++++++---------
3 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/build.gradle b/build.gradle
index 9910a8a..91884e5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -154,6 +154,7 @@ ext {
jarjarVersion = '1.7.2'
jlineVersion = '2.14.6'
jmockVersion = '1.2.0'
+ junitVersion = '4.13.2'
logbackVersion = '1.2.10'
log4jVersion = '1.2.17'
log4j2Version = '2.12.4'
diff --git a/subprojects/groovy-test/build.gradle b/subprojects/groovy-test/build.gradle
index a6c8945..d614e3c 100644
--- a/subprojects/groovy-test/build.gradle
+++ b/subprojects/groovy-test/build.gradle
@@ -18,7 +18,7 @@
*/
dependencies {
compile rootProject
- compile 'junit:junit:4.13.1'
+ compile "junit:junit:$junitVersion"
// groovy-ant needed for FileNameFinder used in AllTestSuite and JavadocAssertionTestSuite
testRuntime(project(':groovy-ant')) {
transitive = false // bring in just what we need below
diff --git a/subprojects/performance/build.gradle b/subprojects/performance/build.gradle
index b0b7e1f..373d142 100644
--- a/subprojects/performance/build.gradle
+++ b/subprojects/performance/build.gradle
@@ -25,13 +25,18 @@ configurations {
}
dependencies {
- testCompile 'org.codehaus.groovy:groovy-all:2.4.12'
+ testCompile 'org.codehaus.groovy:groovy-all:2.5.16'
+ testCompile "junit:junit:$junitVersion"
stats 'org.apache.commons:commons-math3:3.6'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
+def findProject = { name ->
+ rootProject.subprojects.find{it.name == name }
+}
+
task performanceTests {
ext.outputDir = file("$buildDir/compilation")
ext.dataFile = file("$buildDir/compilation-stats.csv")
@@ -60,17 +65,25 @@ task performanceTests {
}
}
-['1.8.9', '2.0.8', '2.1.9', '2.2.2', '2.3.10', '2.3.11', '2.4.12', 'current'].each { version ->
- def t = task "performanceTestGroovy${version.replace('.', '_')}"(type: JavaExec) {
+['2.0.8', '2.1.9', '2.2.2', '2.3.11', '2.4.21', '2.5.16', 'current'].each { version ->
+ def t = task "performanceTestGroovy_${version.replace('.', '_')}"(type: JavaExec) {
dependsOn compileTestJava
def groovyConf = configurations.detachedConfiguration(
- dependencies.create(
- 'current' == version ? files(rootProject.jar.archivePath) : "org.codehaus.groovy:groovy:$version")
+ *('current' == version ?
+ [rootProject, findProject('groovy-test'), findProject('groovy-ant'), findProject('groovy-jsr223'), findProject('groovy-xml')].collect { Project p ->
+ dependencies.create(files(p.jar.archivePath))
+ } + [dependencies.create("org.ow2.asm:asm:$asmVersion"), dependencies.create("antlr:antlr:$antlrVersion")] :
+ version < '2.5.0' ?
+ [dependencies.create("org.codehaus.groovy:groovy-all:$version")]
+ :
+ ['groovy', 'groovy-test', 'groovy-jsr223', 'groovy-xml'].collect { String p ->
+ dependencies.create("org.codehaus.groovy:$p:$version")
+ })
)
groovyConf.transitive = false
main = 'org.apache.groovy.perf.CompilerPerformanceTest'
classpath = groovyConf + sourceSets.test.output + configurations.stats
- jvmArgs = ['-Xms512m', '-Xmx512m', '-XX:MaxPermSize=512m']
+ jvmArgs = ['-Xms512m', '-Xmx512m']
// configure some files to compile. This is an arbitrary set of files which can be compiled
// independently of the version of Groovy being tested
@@ -84,7 +97,7 @@ task performanceTests {
'groovy/time',
'groovy/tree',
'gls/syntax'].collect { "../../src/test/$it" }
- ['groovy-ant', 'groovy-test', 'groovy-jsr223'].collect(testFiles) { "../../subprojects/$it/src/test/groovy" }
+ ['groovy-jsr223', 'groovy-test', 'groovy-jsr223'].collect(testFiles) { "../../subprojects/$it/src/test/groovy" }
['ackermann', 'fibo', 'random', 'spectralnorm', 'ary', 'hello', 'recursive', 'threadring',
'binarytrees', 'mandelbrot', 'regexdna', 'wordfreq',
@@ -95,10 +108,10 @@ task performanceTests {
doFirst {
def compileClassPath = [
'-cp',
- groovyConf.files[0]
+ *groovyConf.files*.absolutePath
]
rootProject.sourceSets.test.compileClasspath.files
- .findAll { it.name.endsWith('jar') && !it.name.contains('groovy') && !it.name.contains('antlr') && !it.name.contains('asm') }
+ .findAll { it.name.endsWith('jar') && !it.name.contains('groovy') }
.collect(compileClassPath) { it.absolutePath }
args = [