tree: 53f38a1a5c38d38f92b8da4f9e044eb55389c494 [path history] [tgz]
  1. images/
  2. scripts/
  3. README.md
saga-performance/README.md

Saga Performance Test

Performance test is automated with JMeter. A great tutorial can be found at Guru99 if you are not familiar with JMeter.

How to Run Performance Test

To run performance test, execute the following JMeter command

jmeter -n -t saga.jmx -l log.jtl

To generate test report from JMeter test log, run the following JMeter command

jmeter -g log.jtl -o <report folder>

How to Enable Kamon Metrics

Kamon is used to track saga performance and reports trace data to both log and StatsD. The easiest way to visualize tracing reports is to use a docker image composed with StatsD, Graphite, and Grafana

  1. Build saga with profile perf.
mvn package -Pperf
  1. Run saga with aspectj and Kamon enabled. By default, tracing data will be reported to StatsD running on localhost and port 8125. To change the default StatsD host configuration, pass -Dkamon.statsd.hostname=<hostname> and -Dkamon.statsd.port=<port> as vm options when running saga.
java -javaagent:/path/to/aspectj-weaver.jar -Dkamon.modules.kamon-annotation.auto-start=yes -Dkamon.modules.kamon-log-reporter.auto-start=yes -Dkamon.modules.kamon-statsd.auto-start=yes -jar saga.jar
  1. Add a new row with the following query in Grafana to display the segments of trace data. Please refer to Grafana Tutorial if you need some help

Grafana Metrics

Recommended Test Setup

Three test machines to run the following services on each:

  • saga
  • car service in saga-demo
  • MySQL

The car service and saga can share the same machine, since car service consumes very little CPU and memory, and has no disk access.