We have a project for running load tests with Gatling against Magnolia. The corresponding git repository is performance-loadtests.
Preparation
Gatling is based on Scala, so you may want to install a Scala plugin for your IDE. Make sure the Scala version matches the one used in the project (2.11.* at the time of this writing).
Run Magnolia webapp
Start magnolia-load-webapp with / as application context (found under Run Configurations > Deployment in IntelliJ) and run installation tasks if necessary.
Load test application configuration
In IntelliJ, create a new application configuration with the following properties:
Main class: Engine
VM options: -DsimulationName=findbar-masses -DsimulationClass=info.magnolia.loadtest.simulation.FindBarMassSimulation -Dgatling.test.instance=http://localhost:8080
This is an example to run FindBarMassSimulation - for others, adjust as needed.
Use classpath of module: magnolia-load-test
Run load test
Once the Magnolia webapp is up and running and the load test application has been properly configured, it can be executed.
A successful run will continuously print statistics to the output, similar to the following snippet:
Memory consumption
In order to observe memory consumption during different load tests, you can attach an external profiler like VisualVM. Just attach the profiler to the running Magnolia webapp server (most likely Tomcat) and observe its behavior while the load test application is running against that.