Move jmh benchmarks to the artifact that is testing (#2515)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2021-01-13 14:05:51 -08:00 committed by GitHub
parent bd5a770afa
commit 957bd0ad1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 26 additions and 28 deletions

View File

@ -23,28 +23,7 @@ dependencies {
testImplementation project(':sdk:testing')
testImplementation libraries.junit_pioneer
jmh project(':sdk:metrics')
jmh(project(':sdk:testing')) {
// JMH doesn't handle dependencies that are duplicated between the main and jmh
// configurations properly, but luckily here it's simple enough to just exclude transitive
// dependencies.
transitive = false
}
jmh(project(':exporters:otlp:trace')) {
// The opentelemetry-exporter-otlp-trace depends on this project itself. So don't pull in
// the transitive dependencies.
transitive = false
}
// explicitly adding the opentelemetry-exporter-otlp dependencies
jmh(project(':sdk-extensions:otproto')) { transitive = false }
jmh(project(':proto'))
jmh("io.grpc:grpc-api")
jmh("io.grpc:grpc-netty-shaded")
jmh("org.testcontainers:testcontainers:1.15.1") // testContainer for OTLP collector
jmh libraries.guava
signature libraries.android_signature
}

View File

@ -22,7 +22,7 @@ dependencies {
testImplementation libraries.guava
testImplementation project(':sdk:testing')
testImplementation libraries.junit_pioneer
signature libraries.android_signature
}

View File

@ -16,7 +16,7 @@ dependencies {
project(':sdk:common')
implementation project(':api:metrics')
annotationProcessor libraries.auto_value
testAnnotationProcessor libraries.auto_value
@ -26,6 +26,26 @@ dependencies {
testImplementation project(':sdk:testing')
testImplementation libraries.junit_pioneer
jmh project(':sdk:metrics')
jmh(project(':sdk:testing')) {
// JMH doesn't handle dependencies that are duplicated between the main and jmh
// configurations properly, but luckily here it's simple enough to just exclude transitive
// dependencies.
transitive = false
}
jmh(project(':exporters:otlp:trace')) {
// The opentelemetry-exporter-otlp-trace depends on this project itself. So don't pull in
// the transitive dependencies.
transitive = false
}
// explicitly adding the opentelemetry-exporter-otlp dependencies
jmh(project(':sdk-extensions:otproto')) { transitive = false }
jmh(project(':proto'))
jmh("io.grpc:grpc-api")
jmh("io.grpc:grpc-netty-shaded")
jmh("org.testcontainers:testcontainers:1.15.1") // testContainer for OTLP collector
jmh libraries.guava
signature libraries.android_signature
}

View File

@ -36,7 +36,6 @@ public class SpanBenchmark {
@Setup(Level.Trial)
public final void setup() {
TraceConfig alwaysOn = TraceConfig.builder().setSampler(Sampler.alwaysOn()).build();
SdkTracerProvider tracerProvider =
SdkTracerProvider.builder().setResource(serviceResource).setTraceConfig(alwaysOn).build();

View File

@ -91,7 +91,7 @@ public class BatchSpanProcessorBenchmark {
processor.shutdown().join(10, TimeUnit.SECONDS);
}
/** Export spans through {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor}. */
/** Export spans through {@link BatchSpanProcessor}. */
@Benchmark
@Fork(1)
@Threads(5)

View File

@ -128,7 +128,7 @@ public class BatchSpanProcessorDroppedSpansBenchmark {
}
}
/** Export spans through {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor}. */
/** Export spans through {@link BatchSpanProcessor}. */
@Benchmark
@Fork(1)
@Threads(5)

View File

@ -91,7 +91,7 @@ public class BatchSpanProcessorFlushBenchmark {
processor.shutdown().join(10, TimeUnit.SECONDS);
}
/** Export spans through {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor}. */
/** Export spans through {@link BatchSpanProcessor}. */
@Benchmark
@Fork(1)
@Threads(5)