aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorzpencer <spencerfang@google.com>2018-03-13 17:46:03 -0700
committerGitHub <noreply@github.com>2018-03-13 17:46:03 -0700
commit4f19f1474f69adf6719157cae5b50d1a71e66f85 (patch)
treed920dbc34442f44b0d19acac2cd6df4278352587 /build.gradle
parent2761bbb85187179b8f4c8acf98829c09e104572d (diff)
downloadgrpc-grpc-java-4f19f1474f69adf6719157cae5b50d1a71e66f85.tar.gz
buildscript: read jmh include class from project property (#4215)
The project property can be set form the CLI, so that it is simple to run JMH on a single class.
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle5
1 files changed, 5 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index 157b23ef9..f34da55d9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -288,6 +288,8 @@ subprojects {
source = fileTree(dir: "src/test", include: "**/*.java")
}
+ // invoke jmh on a single benchmark class like so:
+ // ./gradlew -PjmhIncludeSingleClass=StatsTraceContextBenchmark clean :grpc-core:jmh
jmh {
warmupIterations = 10
iterations = 10
@@ -296,6 +298,9 @@ subprojects {
// dependencies that break when including them. (context's testCompile
// depends on core; core's testCompile depends on testing)
includeTests = false
+ if (project.hasProperty('jmhIncludeSingleClass')) {
+ include = [project.property('jmhIncludeSingleClass')]
+ }
}
task javadocJar(type: Jar) {