Files
spring-cloud-sleuth/benchmarks
Marcin Grzejszczak 0f29735c11 Managing spans with annotations (#526)
The main arguments for these features are

* api-agnostic means to collaborate with a span
    - use of annotations allows users to add to a span with no library dependency on a span api.
    This allows Sleuth to change its core api less impact to user code.
* reduced surface area for basic span operations.
    - without this feature one has to use the span api, which has lifecycle commands that
    could be used incorrectly. By only exposing scope, tag and log functionality, users can
    collaborate without accidentally breaking span lifecycle.
* collaboration with runtime generated code
    - with libraries such as Spring Data / Feign the implementations of interfaces are generated
    at runtime thus span wrapping of objects was tedious. Now you can provide annotations
     over interfaces and arguments of those interfaces

This PR is an adoption of @Koizumi85 work started here - https://github.com/Koizumi85/spring-cloud-sleuth-annotation

fixes #182
2017-02-27 15:26:03 +01:00
..
2017-02-27 15:26:03 +01:00

== Spring Cloud Sleuth Benchmarks

This module can run benchmarks using the following tools

- JMH
- JMeter

=== How to run it?

In the root folder inside the `scripts` folder there are the following benchmark scripts:

- runJmhBenchmark.sh
- runJmeterBenchmarks.sh

Just execute them from the root folder like this:

[source]
----
./scripts/runJmeterBenchmarks.sh
./scripts/runJmhBenchmarks.sh
----

=== How do they work?

For JMH we're building a shaded JAR file that is next executed.

For JMeter we're running two applications, one with Sleuth, one without with Spring Boot
Maven Plugin. Next a Maven JMeter plugin is executed that loads the `*.jmx` files, starts
JMeter and prints out the results. At the end Spring Boot Maven Plugin stops the applications.

=== What are we testing?

For now we're testing the performance impact of the following:

- our custom Trace HTTP filter
- instrumentation of controllers - `@Callable` returning and the sync one
- instrumentation of RestTemplate
- `@Async` annotated methods