- All Implemented Interfaces:
- javax.jms.MessageListener
public class MercuryTestController
extends MercuryBase
implements javax.jms.MessageListener
The Controller coordinates a test run between a number
of producers and consumers, configured via -Dprod_count and -Dcons_count.
It waits till all the producers and consumers have registered and then
conducts a warmup run. Once all consumers and producers have completed
the warmup run and is ready, it will conduct the actual test run and
collect all stats from the participants and calculates the system
throughput, the avg/min/max for producer rates, consumer rates and latency.
These stats are then printed to std out.
The Controller also prints events to std out to give a running account
of the test run in progress. Ex registering of participants, starting warmup ..etc.
This allows a scripting tool to monitor the progress.
The Controller can be run in two modes.
1. A single test run (default) where it just runs until the message count specified
for the producers via -Dmsg_count is sent and received.
2. Time based, configured via -Dduration=x, where x is in mins.
In this mode, the Controller repeatedly cycles through the tests (after an initial
warmup run) until the desired time is reached. If a test run is in progress
and the time is up, it will allow the run the complete.
After each iteration, the stats will be printed out in csv format to a separate log file.
System throughput is calculated as follows
totalMsgCount/(totalTestTime)