Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 2.42 KB

File metadata and controls

56 lines (37 loc) · 2.42 KB

DeatByJava - Containerized Java Load Generator

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.

Run the automated build version

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

Clone this project

You can clone this project:

git clone https://github.com/flavorplus/DeathByJava.git

Build an image using the cloned project

cd into the directory of the cloned GitHub project

docker build -t <your-username>/deathbyjava:latest .

Run the container on a Docker-enabled Linux host

docker run -p 8080:8080 -d --name deathbyjava  <your-username>/deathbyjava:latest

Access the sample application

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.

Access the logs

You can use this simple command to check the catalina logs of the Tomcat container

docker logs deathbyjava

Check the files inside the container

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/