Basic Java-based load generator. The container runs a fixed number of expensive operations based on the request parameter [n]. The expensive operations will peg a core for however long it takes to complete the operations, so that when contention occurs, the “however long” takes longer. The expensive operation is based on Math functions.
The easiest way to run the project is to use to automated build version:
docker run -p 8080:8080 -d --name <some_thing> flavorplus/deathbyjava:latest
You can clone this project:
git clone https://github.com/flavorplus/DeathByJava.git
cd into the directory of the cloned GitHub project
docker build -t <your-username>/deathbyjava:latest .
docker run -p 8080:8080 -d --name deathbyjava <your-username>/deathbyjava:latest
You can access the sample application on this URL: http://:8080/?n=XXXX XXXX is the number of iterations you want to run x 100.
You can use this simple command to check the catalina logs of the Tomcat container
docker logs deathbyjava
You can run this command to enter the container and check the files under the webapps directory
docker exec -it deathbyjava bash
ls -lrt /usr/src/java-code/