-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (81 loc) · 3.56 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
96
97
98
99
100
101
102
103
104
105
import org.gradle.api.artifacts.*
group 'eu.erdin'
version '0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'base' //
apply plugin: 'maven'
apply plugin: 'application'
apply plugin: 'war'
ext.quasarVer = '0.7.7'
ext.comsatVer = '0.5.0'
ext.metricsVer = '3.1.2'
ext.servletVer = '3.1.0'
ext.jettyVer = '9.3.8.v20160314'
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenLocal();
mavenCentral();
maven { url "https://oss.sonatype.org/content/repositories/releases" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
configurations {
quasar
}
dependencies {
runtime "co.paralleluniverse:quasar-core:$quasarVer"
testCompile group: 'junit', name: 'junit', version: '4.11'
compile "co.paralleluniverse:quasar-core:$quasarVer"
compile "co.paralleluniverse:comsat-servlet:$comsatVer"
compile "co.paralleluniverse:comsat-jax-rs-client:$comsatVer"
compile "co.paralleluniverse:comsat-httpclient:$comsatVer"
compile "org.eclipse.jetty:jetty-server:$jettyVer"
compile "org.eclipse.jetty:jetty-servlet:$jettyVer"
compile "org.eclipse.jetty:jetty-webapp:$jettyVer"
compile "org.eclipse.jetty.websocket:javax-websocket-server-impl:$jettyVer"
testCompile group: 'io.gatling', name: 'gatling-core', version: '2.2.3'
testCompile group: 'io.gatling', name: 'gatling-http', version: '2.2.3'
// compile project(':test-servlet')
// compile project(':comsat-examples-servlet')
quasar "co.paralleluniverse:quasar-core:$quasarVer"
providedCompile "co.paralleluniverse:quasar-core:$quasarVer"
providedCompile "javax.servlet:javax.servlet-api:$servletVer"
}
tasks.withType(JavaExec) {
jvmArgs '-server'
// jvmArgs "-javaagent:${configurations.quasar.iterator().next()}" // =vdmc (verbose, debug, allow monitors, check class)
// systemProperty "co.paralleluniverse.fibers.DefaultFiberPool.parallelism", "4"
// systemProperty "co.paralleluniverse.fibers.DefaultFiberPool.monitor", "JMX" // "METRICS" // "NONE" //
systemProperty "co.paralleluniverse.actors.moduleDir", "${rootProject.projectDir}/modules"
// memory
jvmArgs '-Xmx4096m'
// jvmArgs '-XX:+UseParallelGC'
// jvmArgs '-XX:+UseCondCardMark'
jvmArgs '-XX:+UseG1GC', '-XX:MaxGCPauseMillis=50'
// profiling
// jvmArgs '-XX:+UnlockCommercialFeatures', '-XX:+FlightRecorder'
// jvmArgs '-verbose:gc'
// jvmArgs '-XX:+UnlockDiagnosticVMOptions', '-XX:+TraceClassLoading', '-XX:+LogCompilation' // use with jitwatch
// jvmArgs '-XX:+UnlockDiagnosticVMOptions', '-XX:+PrintInlining'
// logging
systemProperty "log4j.configurationFile", "${rootProject.projectDir}/log4j.xml"
// systemProperty "Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"
// debugging
// jvmArgs '-ea'
// systemProperty "co.paralleluniverse.debugMode", "true"
// systemProperty "co.paralleluniverse.globalFlightRecorder", "true"
// systemProperty "co.paralleluniverse.flightRecorderDumpFile", "spaceships.log"
// systemProperty "co.paralleluniverse.monitoring.flightRecorderSize","100000"
}
run {
if (project.hasProperty('mainClass') && mainClass != '')
main = mainClass
else
main = 'eu.erdin.throttler.EmbeddedServer'
standardInput = System.in
jvmArgs "-javaagent:${configurations.quasar.iterator().next()}" // =v, =d
jvmArgs "-ea"
// verify fiber instrumentation
// systemProperty 'co.paralleluniverse.fibers.verifyInstrumentation', 'true'
}
defaultTasks 'run'