Fixes how jmh csv reports are stored
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@ pom.xml.versionsBackup
|
||||
.sts4-cache
|
||||
_includes
|
||||
.sdkmanrc
|
||||
results/jmh/*.csv
|
||||
@@ -47,10 +47,6 @@ import static org.assertj.core.api.BDDAssertions.then;
|
||||
@Microbenchmark
|
||||
public class AnnotationBenchmarksTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:annotation.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public void manuallyCreatedSpans(BenchmarkContext context) throws Exception {
|
||||
then(context.sleuth.manualSpan()).isEqualTo("continued");
|
||||
|
||||
@@ -47,10 +47,6 @@ import static org.assertj.core.api.BDDAssertions.then;
|
||||
@Microbenchmark
|
||||
public class AsyncBenchmarksTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:async.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public void asyncMethodWithoutSleuth(BenchmarkContext context) throws Exception {
|
||||
then(context.untracedAsyncMethodHavingBean.async().get()).isEqualTo("async");
|
||||
|
||||
@@ -70,10 +70,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
@Microbenchmark
|
||||
public class HttpFilterBenchmarksTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:http_filter.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(2)
|
||||
|
||||
@@ -59,10 +59,6 @@ import static org.assertj.core.api.BDDAssertions.then;
|
||||
@Microbenchmark
|
||||
public class RestTemplateBenchmarkTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:rest_template.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public void syncEndpointWithoutSleuth(BenchmarkContext context) throws IOException, ServletException {
|
||||
then(context.untracedTemplate.getForObject("/foo", String.class)).isEqualTo("foo");
|
||||
|
||||
@@ -39,10 +39,6 @@ import org.springframework.cloud.sleuth.benchmarks.jmh.ProcessLauncherState;
|
||||
@Disabled("Process doesn't stop")
|
||||
public class StartupBenchmarkTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:startup.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public void withAnnotations(ApplicationState state) throws Exception {
|
||||
state.run();
|
||||
|
||||
@@ -64,10 +64,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@Microbenchmark
|
||||
public class MicroBenchmarkStreamTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:stream.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Testable
|
||||
public void testStream(BenchmarkContext context) throws Exception {
|
||||
|
||||
@@ -49,10 +49,6 @@ import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
@Microbenchmark
|
||||
public class MicroBenchmarkHttpTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:http.csv");
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Testable
|
||||
public void test(BenchmarkContext context) throws Exception {
|
||||
|
||||
@@ -70,10 +70,6 @@ public class SpringWebFluxBenchmarksTests {
|
||||
protected static TraceContext defaultTraceContext = TraceContext.newBuilder().traceIdHigh(333L).traceId(444L)
|
||||
.spanId(3).sampled(true).build();
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:webflux.csv");
|
||||
}
|
||||
|
||||
protected ConfigurableApplicationContext applicationContext;
|
||||
|
||||
protected SleuthBenchmarkingSpringWebFluxApp springWebFluxApp;
|
||||
|
||||
@@ -28,10 +28,6 @@ import org.openjdk.jmh.runner.options.OptionsBuilder;
|
||||
@Microbenchmark
|
||||
public class WithOutReactorSleuthSpringWebFluxBenchmarksTests extends SpringWebFluxBenchmarksTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:webflux_no_reactor_instrumentation.csv");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws RunnerException {
|
||||
Options opt = new OptionsBuilder()
|
||||
.include(".*" + WithOutReactorSleuthSpringWebFluxBenchmarksTests.class.getSimpleName() + ".*").build();
|
||||
|
||||
@@ -28,10 +28,6 @@ import org.openjdk.jmh.runner.options.OptionsBuilder;
|
||||
@Microbenchmark
|
||||
public class WithOutSleuthSpringWebFluxBenchmarksTests extends SpringWebFluxBenchmarksTests {
|
||||
|
||||
static {
|
||||
System.setProperty("jmh.mbr.report.publishTo", "csv:webflux_no_sleuth_instrumentation.csv");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws RunnerException {
|
||||
Options opt = new OptionsBuilder()
|
||||
.include(".*" + WithOutSleuthSpringWebFluxBenchmarksTests.class.getSimpleName() + ".*").build();
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Running JMH Benchmarks"
|
||||
./mvnw clean install -Pbenchmarks -pl benchmarks --also-make -DskipTests && ./mvnw verify -Djmh.mbr.report.publishTo=csv:http.csv -pl benchmarks -Pbenchmarks
|
||||
ROOT="$( pwd )"
|
||||
JMH_RESULT_FILE_PARENT="${ROOT}/results/jmh"
|
||||
mkdir -p "${JMH_RESULT_FILE_PARENT}"
|
||||
JMH_RESULT_FILE="${JMH_RESULT_FILE_PARENT}/jmh-result.csv"
|
||||
echo "Will produce results under [${JMH_RESULT_FILE}]"
|
||||
./mvnw clean install -Pbenchmarks -pl benchmarks --also-make -DskipTests && ./mvnw verify -DpublishTo=csv:"${JMH_RESULT_FILE}" -pl benchmarks -Pbenchmarks
|
||||
|
||||
# java -Djmh.ignoreLock=true -jar benchmarks/target/benchmarks.jar org.springframework.cloud.sleuth.benchmarks.jmh.* -rf csv -rff jmh-result.csv | tee target/benchmarks.log
|
||||
|
||||
Reference in New Issue
Block a user