aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorZHANG Dapeng <zdapeng@google.com>2018-06-11 18:35:18 -0700
committerGitHub <noreply@github.com>2018-06-11 18:35:18 -0700
commit5ce10f0146ddce96bc1e6884fe55d8623880b528 (patch)
tree74dd7fcfff4f3dcc5e9de108d7cfa385bce564ec /benchmarks
parent9d26c5c40596693bb643d267ab2f3d25b15ed36b (diff)
downloadgrpc-grpc-java-5ce10f0146ddce96bc1e6884fe55d8623880b528.tar.gz
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/build.gradle34
1 files changed, 18 insertions, 16 deletions
diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle
index 57115747a..809f34ee5 100644
--- a/benchmarks/build.gradle
+++ b/benchmarks/build.gradle
@@ -1,13 +1,9 @@
buildscript {
repositories {
- maven {
- // The google mirror is less flaky than mavenCentral()
- url "https://maven-central.storage-download.googleapis.com/repos/central/data/"
- }
- }
- dependencies {
- classpath libraries.protobuf_plugin
+ maven { // The google mirror is less flaky than mavenCentral()
+ url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
}
+ dependencies { classpath libraries.protobuf_plugin }
}
apply plugin: 'application'
@@ -41,23 +37,25 @@ dependencies {
}
compileJava {
- // The Control.Void protobuf clashes
- options.compilerArgs += ["-Xep:JavaLangClash:OFF"]
+ // The Control.Void protobuf clashes
+ options.compilerArgs += ["-Xep:JavaLangClash:OFF"]
}
configureProtoCompilation()
def vmArgs = [
- "-server",
- "-Xms2g",
- "-Xmx2g",
- "-XX:+PrintGCDetails"
+ "-server",
+ "-Xms2g",
+ "-Xmx2g",
+ "-XX:+PrintGCDetails"
]
task qps_client(type: CreateStartScripts) {
mainClassName = "io.grpc.benchmarks.qps.AsyncClient"
applicationName = "qps_client"
- defaultJvmOpts = ["-javaagent:" + configurations.alpnagent.asPath] + vmArgs
+ defaultJvmOpts = [
+ "-javaagent:" + configurations.alpnagent.asPath
+ ].plus(vmArgs)
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
@@ -65,7 +63,9 @@ task qps_client(type: CreateStartScripts) {
task openloop_client(type: CreateStartScripts) {
mainClassName = "io.grpc.benchmarks.qps.OpenLoopClient"
applicationName = "openloop_client"
- defaultJvmOpts = ["-javaagent:" + configurations.alpnagent.asPath] + vmArgs
+ defaultJvmOpts = [
+ "-javaagent:" + configurations.alpnagent.asPath
+ ].plus(vmArgs)
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
@@ -80,7 +80,9 @@ task qps_server(type: CreateStartScripts) {
task benchmark_worker(type: CreateStartScripts) {
mainClassName = "io.grpc.benchmarks.driver.LoadWorker"
applicationName = "benchmark_worker"
- defaultJvmOpts = ["-javaagent:" + configurations.alpnagent.asPath] + vmArgs
+ defaultJvmOpts = [
+ "-javaagent:" + configurations.alpnagent.asPath
+ ].plus(vmArgs)
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}