aboutsummaryrefslogtreecommitdiffstats
path: root/gradle
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-30 20:03:33 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-30 20:03:33 +0200
commit532d2045f5f87e9049475ddd055c7a93ea38dca0 (patch)
treec7585eba98c27fbda93fcdff177056def0a0cf71 /gradle
parentReplaced platformURI with projectMapping to fix genmodel error. (diff)
downloadrefinery-532d2045f5f87e9049475ddd055c7a93ea38dca0.tar.gz
refinery-532d2045f5f87e9049475ddd055c7a93ea38dca0.tar.zst
refinery-532d2045f5f87e9049475ddd055c7a93ea38dca0.zip
Add JMH benchmarks for model-data
Diffstat (limited to 'gradle')
-rw-r--r--gradle/java-common.gradle4
-rw-r--r--gradle/jmh.gradle40
2 files changed, 42 insertions, 2 deletions
diff --git a/gradle/java-common.gradle b/gradle/java-common.gradle
index 24df4201..caae7d78 100644
--- a/gradle/java-common.gradle
+++ b/gradle/java-common.gradle
@@ -52,9 +52,9 @@ eclipse {
52 } 52 }
53 } 53 }
54 } 54 }
55 55
56 jdt.file.whenMerged { properties -> 56 jdt.file.whenMerged { properties ->
57 // Allow @SupperessWarnings to suppress SonalLint warnings 57 // Allow @SupperessWarnings to suppress SonarLint warnings
58 properties['org.eclipse.jdt.core.compiler.problem.unhandledWarningToken'] = 'ignore' 58 properties['org.eclipse.jdt.core.compiler.problem.unhandledWarningToken'] = 'ignore'
59 } 59 }
60} 60}
diff --git a/gradle/jmh.gradle b/gradle/jmh.gradle
new file mode 100644
index 00000000..ea88f3e3
--- /dev/null
+++ b/gradle/jmh.gradle
@@ -0,0 +1,40 @@
1configurations {
2 jmh {
3 extendsFrom compile
4 }
5}
6
7sourceSets {
8 jmh {
9 java.srcDirs = ['src/jmh/java']
10 resources.srcDirs = ['src/jmh/resources']
11 compileClasspath += sourceSets.main.runtimeClasspath
12 compileClasspath += sourceSets.test.runtimeClasspath
13 xtendOutputDir = 'src/jmh/xtend-gen'
14 }
15}
16
17dependencies {
18 jmhRuntime "org.openjdk.jmh:jmh-core:${jmhVersion}"
19 jmhCompile "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}"
20 jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}"
21}
22
23clean.doLast {
24 delete 'src/jmh/xtend-gen'
25}
26
27task jmh(type: JavaExec, dependsOn: jmhClasses) {
28 main = 'org.openjdk.jmh.Main'
29 classpath = sourceSets.jmh.compileClasspath + sourceSets.jmh.runtimeClasspath
30}
31
32eclipse.classpath {
33 plusConfigurations += [configurations.jmh]
34
35 // Allow test helper classes to be used in benchmarks from Eclipse.
36 file.whenMerged { classpath ->
37 def jmhClasspathEntry = classpath.entries.find { entry -> entry.path == 'src/jmh/java' }
38 jmhClasspathEntry.entryAttributes['test'] = true
39 }
40}