88 lines
3.7 KiB
Groovy
88 lines
3.7 KiB
Groovy
plugins {
|
|
id 'groovy'
|
|
id "com.github.johnrengelman.shadow" version "2.0.1"
|
|
id "me.champeau.gradle.jmh" version "0.4.4"
|
|
}
|
|
|
|
description = 'dd-trace'
|
|
|
|
apply from: "${rootDir}/gradle/java.gradle"
|
|
apply from: "${rootDir}/gradle/publish.gradle"
|
|
apply from: "${rootDir}/gradle/jacoco.gradle"
|
|
minimumBranchCoverage = 0.3
|
|
minimumInstructionCoverage = 0.5
|
|
whitelistedInstructionClasses += whitelistedBranchClasses += [
|
|
"com.datadoghq.trace.integration.*",
|
|
'com.datadoghq.trace.writer.ListWriter',
|
|
'com.datadoghq.trace.DDTags',
|
|
'com.datadoghq.trace.DDTraceInfo',
|
|
'com.datadoghq.trace.util.Clock',
|
|
]
|
|
|
|
dependencies {
|
|
compile group: 'io.opentracing', name: 'opentracing-api', version: '0.30.0'
|
|
compile group: 'io.opentracing', name: 'opentracing-noop', version: '0.30.0'
|
|
compile group: 'io.opentracing', name: 'opentracing-util', version: '0.30.0'
|
|
compile group: 'io.opentracing.contrib', name: 'opentracing-tracerresolver', version: '0.1.0'
|
|
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.8'
|
|
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.8.8'
|
|
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
|
compile group: 'com.google.auto.service', name: 'auto-service', version: '1.0-rc3'
|
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
|
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.6.2'
|
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22'
|
|
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
|
|
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
|
|
testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
|
|
testCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.4.6'
|
|
jmh 'commons-io:commons-io:2.4'
|
|
}
|
|
|
|
jar {
|
|
classifier = 'unbundled'
|
|
}
|
|
|
|
shadowJar {
|
|
// mergeServiceFiles()
|
|
|
|
classifier null
|
|
|
|
// Don't relocate slf4j or opentracing deps.
|
|
relocate 'com.fasterxml', 'dd.deps.com.fasterxml'
|
|
relocate 'com.google', 'dd.deps.com.google'
|
|
relocate 'javassist', 'dd.deps.javassist'
|
|
relocate 'org.jboss.byteman', 'dd.deps.org.jboss.byteman'
|
|
relocate 'org.reflections', 'dd.deps.org.reflections'
|
|
relocate 'org.yaml', 'dd.deps.org.yaml'
|
|
|
|
dependencies {
|
|
exclude(dependency('org.projectlombok:lombok:1.16.18'))
|
|
}
|
|
}
|
|
|
|
jmh {
|
|
timeUnit = 'us' // Output time unit. Available time units are: [m, s, ms, us, ns].
|
|
benchmarkMode = ['thrpt', 'avgt']
|
|
timeOnIteration = '1s'
|
|
iterations = 1 // Number of measurement iterations to do.
|
|
// fork = 2 // How many times to forks a single benchmark. Use 0 to disable forking altogether
|
|
jvmArgs = []
|
|
failOnError = true // Should JMH fail immediately if any benchmark had experienced the unrecoverable error?
|
|
warmup = '2s' // Time to spend at each warmup iteration.
|
|
warmupIterations = 1 // Number of warmup iterations to do.
|
|
// warmupForks = 0 // How many warmup forks to make for a single benchmark. 0 to disable warmup forks.
|
|
|
|
// profilers = ['stack']
|
|
// Use profilers to collect additional data. Supported profilers: [cl, comp, gc, stack, perf, perfnorm, perfasm, xperf, xperfasm, hs_cl, hs_comp, hs_gc, hs_rt, hs_thr]
|
|
|
|
// humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt") // human-readable output file
|
|
// operationsPerInvocation = 10 // Operations per invocation.
|
|
// synchronizeIterations = false // Synchronize iterations?
|
|
// timeout = '1s' // Timeout for benchmark iteration.
|
|
// includeTests = true
|
|
// Allows to include test sources into generate JMH jar, i.e. use it when benchmarks depend on the test classes.
|
|
|
|
duplicateClassesStrategy = 'fail'
|
|
jmhVersion = '1.19' // Specifies JMH version
|
|
}
|