forked from btraceio/btrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (47 loc) · 1.46 KB
/
build.gradle
File metadata and controls
63 lines (47 loc) · 1.46 KB
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
plugins {
id 'java'
}
description 'A JMH benchmark to assert the overhead imposed by various types of BTrace instrumentation.'
sourceCompatibility = 8
targetCompatibility = 8
def env = System.getenv()
def javaHome = env['JAVA_HOME']
ext {
versions = [
jmh: '1.11.1'
]
libs = [
jmh: ["org.openjdk.jmh:jmh-core:${versions.jmh}",
"org.openjdk.jmh:jmh-generator-annprocess:${versions.jmh}"]
]
}
task btracec(type: JavaExec) {
group 'Build'
inputs.files 'src/main/resources/scripts'
outputs.dir "${buildDir}/classes/main"
environment('BTRACE_HOME', "$projectDir")
classpath configurations.compile
main 'com.sun.btrace.compiler.Compiler'
args '-d'
args "${buildDir}/classes/main"
args fileTree(dir: "src/main/resources/scripts", include: 'TraceScript.java')
}
compileJava.dependsOn btracec
['BTraceBench', 'ProfilerBenchmarks', 'StatsdBenchmarks', 'StringOpBenchmarks'].each { className ->
task(type: JavaExec, className) {
group 'Verification'
description "Run benchmark for class ${className}."
inputs.files project.classes.outputs
inputs.files project.btracec.outputs
classpath project.configurations.runtime
main "net.java.btrace.${className}"
}
}
dependencies {
compile project(':'),
files( rootProject.tasks.agentJar.outputs ),
files( rootProject.tasks.bootJar.outputs ),
files("${buildDir}/classes/main"),
libs.jmh,
files("${javaHome}/lib/tools.jar")
}