-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
95 lines (79 loc) · 1.96 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
plugins {
id 'java'
id 'application'
id 'eclipse'
}
defaultTasks 'runBenchmark'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.slf4j:slf4j-log4j12:1.7.5'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'commons-net:commons-net:3.3'
compile 'org.voltdb:voltdb:8.3'
compile 'org.voltdb:voltdb-client:8.3'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile('org.junit.jupiter:junit-jupiter-api:5.3.1')
testCompile('org.junit.jupiter:junit-jupiter-params:5.3.1')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.3.1')
testCompile ('org.junit.platform:junit-platform-launcher:1.3.1')
}
test {
useJUnitPlatform()
}
sourceSets {
db {
java {srcDir 'src/db/java'}
}
}
task compileDB : compileDbJava {
classpath += sourceSets.main.runtimeClasspath
}
task clientJar(type: Jar) {
baseName = 'client'
from(sourceSets.main.output)
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task dbJar(type: Jar) {
from(sourceSets.db.output)
baseName = 'procs'
}
task jarAll()
jarAll.dependsOn clientJar
jarAll.dependsOn dbJar
task runBenchmark(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.example.benchmark.VoltDBBenchmark'
args = ['localhost', 0, 10000, 100, 60000, 0, 4, 'test-run']
}
task loadInitData(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.example.benchmark.InitDataLoader'
args = ['localhost', 0, 10000, 10, 200, 10000]
}
task startServer(type:Exec) {
doFirst {
commandLine 'voltdb', 'init', '-f'
sleep (2*1000)
commandLine 'voltdb', 'start', '-B'
}
doLast {
sleep (15*1000)
}
}
task loadDDL(type:Exec) {
commandLine 'sqlcmd'
doFirst {
standardInput = new FileInputStream(file("ddl.sql"))
}
}
task stopServer(type:Exec) {
commandLine 'voltadmin', 'shutdown'
}
runBenchmark.dependsOn loadInitData
loadInitData.dependsOn loadDDL
loadDDL.dependsOn startServer
loadDDL.dependsOn jarAll