-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
41 lines (35 loc) · 1.47 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
plugins {
id "java"
}
def rJavaPath = "/usr/local/lib/R/3.2/site-library/rJava"
def rJavaREngineJar = rJavaPath + "/jri/REngine.jar"
def rJavaJRIJar = rJavaPath + "/jri/JRI.jar"
def rJavaJRIEngineJar = rJavaPath + "/jri/JRIEngine.jar"
def rJavaNative = rJavaPath + "/jri/libjri.jnilib"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'org.testng', name: 'testng', version: '6.9.10'
testCompile group: 'com.google.caliper', name: 'caliper', version: '1.0-beta-2'
testCompile files(rJavaREngineJar, rJavaJRIEngineJar, rJavaJRIJar)
testRuntime files(rJavaNative)
}
task runBenchmark(type: JavaExec, dependsOn: test) {
def vmVer = System.getProperty('java.version')
def osName = System.getProperty('os.name').replaceAll('\\s','')
def osArch = System.getProperty('os.arch')
def fnameBase = "ver${version}_${osName}-${osArch}_jvm${vmVer}"
def benchMarksDir = "${project.buildDir}/benchmarks"
ant.mkdir(dir: benchMarksDir)
def outStream = new FileOutputStream("${benchMarksDir}/${fnameBase}-out.txt")
standardOutput = outStream
errorOutput = System.err
main = 'com.google.caliper.runner.CaliperMain'
classpath = sourceSets.test.runtimeClasspath
args = ['vrr.jargon.exponential.GammaInverseCDFBenchmark']
jvmArgs = ['-ea', '-Djava.library.path=/usr/local/lib/R/3.3/site-library/rJava/jri']
environment = [R_HOME : "/usr/local/Cellar/r/3.3.1_2/R.framework/Resources"]
}