123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- plugins {
- id "me.champeau.gradle.jmh" version "0.5.0-rc-2"
- }
- description = 'dd-trace-ot'
- apply from: "${rootDir}/gradle/java.gradle"
- apply from: "${rootDir}/gradle/publish.gradle"
- minimumBranchCoverage = 0.5
- minimumInstructionCoverage = 0.5
- excludedClassesCoverage += [
- 'datadog.trace.common.writer.ListWriter',
- 'datadog.trace.common.writer.LoggingWriter',
- // This code is copied from okHttp samples and we have integration tests to verify that it works.
- 'datadog.trace.common.writer.unixdomainsockets.TunnelingUnixSocket',
- 'datadog.trace.common.writer.unixdomainsockets.UnixDomainSocketFactory'
- ]
- apply plugin: 'org.unbroken-dome.test-sets'
- testSets {
- ot31CompatabilityTest
- ot33CompatabilityTest
- traceAgentTest
- }
- dependencies {
- annotationProcessor deps.autoservice
- implementation deps.autoservice
- compile project(':dd-trace-api')
- compile deps.opentracing
- compile group: 'io.opentracing.contrib', name: 'opentracing-tracerresolver', version: '0.1.0'
- compile group: 'com.datadoghq', name: 'java-dogstatsd-client', version: '2.1.1'
- compile deps.jackson
- compile deps.slf4j
- compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.11.0' // Last version to support Java7
- compile group: 'com.github.jnr', name: 'jnr-unixsocket', version: '0.23'
- compile group: 'com.lmax', name: 'disruptor', version: '3.4.2'
- // We have autoservices defined in test subtree, looks like we need this to be able to properly rebuild this
- testAnnotationProcessor deps.autoservice
- testImplementation deps.autoservice
- testCompile project(":dd-java-agent:testing")
- testCompile project(':utils:gc-utils')
- testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.17.1'
- traceAgentTestCompile deps.testcontainers
- ot31CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-api', version: '0.31.0'
- ot31CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-util', version: '0.31.0'
- ot31CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-noop', version: '0.31.0'
- ot33CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-api', version: '0.33.0'
- ot33CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-util', version: '0.33.0'
- ot33CompatabilityTestCompile group: 'io.opentracing', name: 'opentracing-noop', version: '0.33.0'
- }
- [configurations.ot31CompatabilityTestCompile, configurations.ot31CompatabilityTestRuntime].each {
- it.resolutionStrategy {
- force group: 'io.opentracing', name: 'opentracing-api', version: '0.31.0'
- force group: 'io.opentracing', name: 'opentracing-util', version: '0.31.0'
- force group: 'io.opentracing', name: 'opentracing-noop', version: '0.31.0'
- }
- }
- [configurations.ot33CompatabilityTestCompile, configurations.ot33CompatabilityTestRuntime].each {
- it.resolutionStrategy {
- force group: 'io.opentracing', name: 'opentracing-api', version: '0.33.0'
- force group: 'io.opentracing', name: 'opentracing-util', version: '0.33.0'
- force group: 'io.opentracing', name: 'opentracing-noop', version: '0.33.0'
- }
- }
- test.finalizedBy ot31CompatabilityTest
- test.finalizedBy ot33CompatabilityTest
- jmh {
- // include = [".*URLAsResourceNameBenchmark"]
- // include = ['some regular expression'] // include pattern (regular expression) for benchmarks to be executed
- // exclude = ['some regular expression'] // exclude pattern (regular expression) for benchmarks to be executed
- iterations = 1 // Number of measurement iterations to do.
- benchmarkMode = ['thrpt', 'avgt', 'ss']
- // Benchmark mode. Available modes are: [Throughput/thrpt, AverageTime/avgt, SampleTime/sample, SingleShotTime/ss, All/all]
- batchSize = 1
- // Batch size: number of benchmark method calls per operation. (some benchmark modes can ignore this setting)
- fork = 1 // How many times to forks a single benchmark. Use 0 to disable forking altogether
- failOnError = false // Should JMH fail immediately if any benchmark had experienced the unrecoverable error?
- forceGC = false // Should JMH force GC between iterations?
- // jvm = 'myjvm' // Custom JVM to use when forking.
- // jvmArgs = ['Custom JVM args to use when forking.']
- // jvmArgsAppend = ['Custom JVM args to use when forking (append these)']
- // jvmArgsPrepend =[ 'Custom JVM args to use when forking (prepend these)']
- // humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt") // human-readable output file
- // resultsFile = project.file("${project.buildDir}/reports/jmh/results.txt") // results file
- // operationsPerInvocation = 10 // Operations per invocation.
- // benchmarkParameters = [:] // Benchmark parameters.
- // 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]
- timeOnIteration = '1s' // Time to spend at each measurement iteration.
- // resultFormat = 'CSV' // Result format type (one of CSV, JSON, NONE, SCSV, TEXT)
- // synchronizeIterations = false // Synchronize iterations?
- // threads = 2 // Number of worker threads to run with.
- // threadGroups = [2,3,4] //Override thread group distribution for asymmetric benchmarks.
- // timeout = '1s' // Timeout for benchmark iteration.
- timeUnit = 'us' // Output time unit. Available time units are: [m, s, ms, us, ns].
- // verbosity = 'NORMAL' // Verbosity mode. Available modes are: [SILENT, NORMAL, EXTRA]
- warmup = '2s' // Time to spend at each warmup iteration.
- // warmupBatchSize = 10 // Warmup batch size: number of benchmark method calls per operation.
- warmupForks = 1 // How many warmup forks to make for a single benchmark. 0 to disable warmup forks.
- warmupIterations = 1 // Number of warmup iterations to do.
- // warmupMode = 'INDI' // Warmup mode for warming up selected benchmarks. Warmup modes are: [INDI, BULK, BULK_INDI].
- // warmupBenchmarks = ['.*Warmup'] // Warmup benchmarks to include in the run in addition to already selected. JMH will not measure these benchmarks, but only use them for the warmup.
- // zip64 = true // Use ZIP64 format for bigger archives
- jmhVersion = '1.21' // Specifies JMH version
- // includeTests = true // Allows to include test sources into generate JMH jar, i.e. use it when benchmarks depend on the test classes.
- duplicateClassesStrategy = 'warn'
- // Strategy to apply when encountring duplicate classes during creation of the fat jar (i.e. while executing jmhJar task)
- }
|