File: build.gradle

package info (click to toggle)
grpc-java 1.41.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,884 kB
  • sloc: java: 203,784; xml: 1,224; sh: 1,221; cpp: 1,158; makefile: 40; python: 40
file content (103 lines) | stat: -rw-r--r-- 2,506 bytes parent folder | download | duplicates (2)
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
plugins {
    id "application"
    id "java"
    id "maven-publish"

    id "com.google.protobuf"
    id "me.champeau.gradle.jmh"
}

description = "grpc Benchmarks"

startScripts.enabled = false
run.enabled = false

jmh {
    jvmArgs = "-server -Xms2g -Xmx2g"
}

configurations {
    alpnagent
}

dependencies {
    implementation project(':grpc-core'),
            project(':grpc-netty'),
            project(':grpc-okhttp'),
            project(':grpc-stub'),
            project(':grpc-protobuf'),
            project(':grpc-testing'),
            libraries.hdrhistogram,
            libraries.netty_tcnative,
            libraries.netty_epoll,
            libraries.math
    compileOnly libraries.javax_annotation
    alpnagent libraries.jetty_alpn_agent

    testImplementation libraries.junit,
            libraries.mockito
}

import net.ltgt.gradle.errorprone.CheckSeverity

compileJava {
    // The Control.Void protobuf clashes
    options.errorprone.check("JavaLangClash", CheckSeverity.OFF)
}

configureProtoCompilation()

def vmArgs = [
    "-server",
    "-Xms2g",
    "-Xmx2g",
    "-XX:+PrintGCDetails"
]

task qps_client(type: CreateStartScripts) {
    mainClassName = "io.grpc.benchmarks.qps.AsyncClient"
    applicationName = "qps_client"
    defaultJvmOpts = vmArgs
    outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
    classpath = startScripts.classpath
}

task openloop_client(type: CreateStartScripts) {
    mainClassName = "io.grpc.benchmarks.qps.OpenLoopClient"
    applicationName = "openloop_client"
    defaultJvmOpts = vmArgs
    outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
    classpath = startScripts.classpath
}

task qps_server(type: CreateStartScripts) {
    mainClassName = "io.grpc.benchmarks.qps.AsyncServer"
    applicationName = "qps_server"
    outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
    classpath = startScripts.classpath
}

task benchmark_worker(type: CreateStartScripts) {
    mainClassName = "io.grpc.benchmarks.driver.LoadWorker"
    applicationName = "benchmark_worker"
    defaultJvmOpts = vmArgs
    outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
    classpath = startScripts.classpath
}

applicationDistribution.into("bin") {
    from(qps_client)
    from(openloop_client)
    from(qps_server)
    from(benchmark_worker)
    fileMode = 0755
}

publishing {
    publications {
        maven(MavenPublication) {
            artifact distZip
            artifact distTar
        }
    }
}