Skip to content
Permalink
Browse files
Gradle improvements
* benchmark task is never up-to-date, always reruns
* analyzeRun arguments should be relative to the project root directory
* use gradle source distribution

Signed-off-by: Dan Smith <dsmith@pivotal.io>
  • Loading branch information
nonbinaryprogrammer authored and upthewaterspout committed Dec 10, 2018
1 parent 8b0cfbd commit 04e1ce7dd7136308e9574b3e44c11abe12002fd4
Showing 3 changed files with 9 additions and 6 deletions.
@@ -24,6 +24,8 @@ version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

def outputDir = project.hasProperty('outputDir') ? project.findProperty('outputDir') : new File(project.buildDir, "benchmarks").getAbsolutePath()

repositories {
mavenCentral()
}
@@ -36,6 +38,7 @@ dependencies {
}

task benchmark(type: Test) {
outputs.upToDateWhen { false }
testClassesDirs = project.sourceSets.main.output.classesDirs
classpath = project.sourceSets.main.runtimeClasspath

@@ -45,14 +48,12 @@ task benchmark(type: Test) {

forkEvery 1

def outputDir = project.hasProperty('outputDir') ? project.findProperty('outputDir') : new File(project.buildDir, "benchmarks").getAbsolutePath();

systemProperty 'TEST_HOSTS', project.findProperty('hosts');
systemProperty 'OUTPUT_DIR', outputDir;
systemProperty 'TEST_HOSTS', project.findProperty('hosts')
systemProperty 'OUTPUT_DIR', outputDir

doFirst {
if(!project.hasProperty('hosts')) {
throw new IllegalStateException("You must set the hosts property to a comma separated list of hosts. Eg ./gradlew benchmark -Phosts=localhost,localhost,localhost")
throw new GradleException("You must set the hosts property to a comma separated list of hosts. Eg ./gradlew benchmark -Phosts=localhost,localhost,localhost")
}
}
}
@@ -1,5 +1,6 @@
#Mon Dec 10 10:58:37 PST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
@@ -30,6 +30,7 @@ repositories {

task(analyzeRun, dependsOn: 'classes', type: JavaExec) {
main = 'org.apache.geode.perftest.analysis.Analyzer'
workingDir = rootDir
classpath = sourceSets.main.runtimeClasspath
}

0 comments on commit 04e1ce7

Please sign in to comment.