SleepGenerator Guide   

SleepGenerator is a client that generates (usually many) calls of a SleepingEcho Web Service (a service that receives a message and after a period of sleep it returns it back - really an exciting service; its code is in org.bionanny.samples.SleepingEchoImpl).

The main purpose is to have enough calls that can be monitored, even the calls that can be monitored in real-time (to see so-called still-running requests). It also tests your Tomcat's configuration because it produces a *lot* of threads - so usually the Tomcat complains first but should still respond to all calls, eventually (except that some calls are cancelled because they time-out).

It makes sense to use this client only after you have deployed one or more SleepingEcho Web Services, and others. All that can be done by an Ant target deploy - see the build guide.

  Usage

The SleepGenerator is started by:

build/run/run-generator [options] -f <property-file>
build/run/run-generator [options] <property-file>

This actually calls the class org.bionanny.samples.SleepGenerator.

  Options

Use option -help to get (perhaps more accurate) list of all options.

-f <property-file> This is the main - and mandatory - option (the leading -f may be omitted). The file format is described below.
-v verbose mode (it reports every call)
-q more quiet mode
-c With this option, the client just checks the format of the input property file and prints what would be called, but does not do any real calling (but it still simulates all calls for the full time as indicated in the property file; so it can run long).

  Sleeping properties file

The most important command-line parameter is the <property-file>. It defines what services to call (all of them have always the same functionality, they just sleep for a while, but they are differently named as they constitute several/many Web Services).

The file has format of a Java property file, with the following properties and rules:

There is a testing property file (created by Ant during the compilation time) that can be used (directly or as a template): build/data/sleepers.input. That's why, the sleep generator is usually invoked by typing:

build/run/run-generator build/data/sleepers.input

Probably the best is to use the SleepGenerator together with a client that can show on-the-fly collected data. Such client is a cgi-bin Perl client.


Martin Senger, Mike Niemi
Last modified: Thu Apr 7 23:38:12 2005