forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
123 lines (104 loc) · 3.1 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id "application"
id "java"
id "maven-publish"
id "com.google.protobuf"
id "me.champeau.jmh"
id "ru.vyarus.animalsniffer"
}
description = "grpc Benchmarks"
tasks.named("jmh").configure {
jvmArgs = ["-server", "-Xms2g", "-Xmx2g"]
}
tasks.named("jar").configure {
manifest {
attributes('Automatic-Module-Name': 'io.grpc.benchmarks')
}
}
dependencies {
implementation project(':grpc-core'),
project(':grpc-inprocess'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-stub'),
project(':grpc-protobuf'),
project(':grpc-testing'),
project(path: ':grpc-xds', configuration: 'shadow'),
libraries.hdrhistogram,
libraries.netty.tcnative,
libraries.netty.tcnative.classes,
libraries.commons.math3
implementation (libraries.netty.transport.epoll) {
artifact {
classifier = "linux-x86_64"
}
}
compileOnly libraries.javax.annotation
testImplementation libraries.junit,
libraries.mockito.core
signature libraries.signature.java
}
import net.ltgt.gradle.errorprone.CheckSeverity
tasks.named("compileJava").configure {
// The Control.Void protobuf clashes
options.errorprone.check("JavaLangClash", CheckSeverity.OFF)
}
configureProtoCompilation()
def vmArgs = [
"-server",
"-Xms2g",
"-Xmx2g",
"-XX:+PrintGCDetails"
]
tasks.named("startScripts").configure {
enabled = false
}
tasks.named("run").configure {
enabled = false
}
def qps_client = tasks.register("qps_client", CreateStartScripts) {
mainClass = "io.grpc.benchmarks.qps.AsyncClient"
applicationName = "qps_client"
defaultJvmOpts = vmArgs
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
def openloop_client = tasks.register("openloop_client", CreateStartScripts) {
mainClass = "io.grpc.benchmarks.qps.OpenLoopClient"
applicationName = "openloop_client"
defaultJvmOpts = vmArgs
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
def qps_server = tasks.register("qps_server", CreateStartScripts) {
mainClass = "io.grpc.benchmarks.qps.AsyncServer"
applicationName = "qps_server"
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
def benchmark_worker = tasks.register("benchmark_worker", CreateStartScripts) {
mainClass = "io.grpc.benchmarks.driver.LoadWorker"
applicationName = "benchmark_worker"
defaultJvmOpts = vmArgs
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
application {
applicationDistribution.into("bin") {
from(qps_client)
from(openloop_client)
from(qps_server)
from(benchmark_worker)
filePermissions {
unix(0755)
}
}
}
publishing {
publications {
maven(MavenPublication) {
artifact distZip
artifact distTar
}
}
}