-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (74 loc) · 2.69 KB
/
build.gradle
File metadata and controls
87 lines (74 loc) · 2.69 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* Copyright 2018-2021 Real Logic Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "com.github.ben-manes.versions" version "0.51.0"
}
defaultTasks 'clean', 'build', 'shadowJar'
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDir 'src/jmh/java'
}
}
}
dependencies {
implementation 'org.agrona:agrona:1.23.0'
implementation 'org.openjdk.jmh:jmh-core:1.37'
annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
}
jar.enabled = false
shadowJar {
archiveFileName = 'benchmarks.jar'
manifest.attributes('Main-Class': 'org.openjdk.jmh.Main')
}
tasks.register('runBenchmarks', Exec) {
commandLine 'java',
'-jar', 'build/libs/benchmarks.jar',
'.*Benchmark.*',
'-w', '1s', '-r', '5s', '-wi', '3', '-i', '5', '-f', '5',
'-jvmArgsAppend', '-XX:+UseParallelGC -Xms512m -Xmx512m -XX:BiasedLockingStartupDelay=0'
}
tasks.register('runLatencyBenchmarks', Exec) {
commandLine 'java',
'-jar', 'build/libs/benchmarks.jar',
'.*DatagramChannelLatencyBenchmark.*',
'-w', '1s', '-r', '5s', '-wi', '3', '-i', '5', '-f', '5',
'-jvmArgsAppend', '-XX:+UseParallelGC -Xms512m -Xmx512m -XX:BiasedLockingStartupDelay=0 -Djava.net.preferIPv4Stack=true'
}
tasks.register('runProfilingBenchmarks', Exec) {
commandLine 'java',
'-jar', 'build/libs/benchmarks.jar',
'.*MultiThreadedConnectedDatagramChannelBenchmark.*',
'-w', '1s', '-r', '30s', '-wi', '5', '-i', '1', '-f', '1',
'-jvmArgsAppend', '-XX:+UseParallelGC -Xms512m -Xmx512m -XX:BiasedLockingStartupDelay=0 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints'
}
tasks.register('runGcProfileBenchmarks', Exec) {
commandLine 'java',
'-jar', 'build/libs/benchmarks.jar',
'.*Benchmark.*',
'-w', '1s', '-r', '5s', '-wi', '3', '-i', '5', '-f', '1',
'-prof', 'gc', '-jvmArgsAppend', '-XX:+UseParallelGC -Xms512m -Xmx512m -XX:BiasedLockingStartupDelay=0'
}
wrapper {
gradleVersion = '8.10.2'
distributionType = 'ALL'
}