Overview
--------------

This application aims at providing a protocols test. Initially it was written for assessing the CMI protocol performance and for doing a comparison between CMI and JRMP. It can be used for any others protocols measurements.

The test's invocation chain is :

EJB client -> SSB/MyService -> SSB/BackA1 ; SSB/BackA2

Call processing time is evaluated both at the client and ejb sides. The EJBs logic is quite light and contains  :
- the code for accessing to the others EJBs in the case of MyService 
- the code for performing the measurements for all

The client implements a loop defined by the command parameters.

Each iteration contain :
- an invocation which can be (according the cmd parameters) either a 'Lookup+Create+Remote' or 'Create+Remote' or  'Remote' or 'MetaData'
- a think time
- statistics update

2 kinds of client are provided multi and multiserial. The first one performs the call with a simple string as parameter whereas the second one performs the call with a complex structure. The serialization cost is higher in the second case.

Results
--------------
During the test, the client prints on the console some statistics in a CSV format. 
A the end of the test, the client prints the average values.
Main indicators are :
- responseTime : global return time at the client side that embedds the invocation time plus the EJB logic processing time (inFacadeMethod).
- inFacadeMethod : EJB logic processing time

Configuration
--------------
the client configuration must be updated in the clientConfig directory. The carol.properties file specifies the connection url to the JOnAS server.

Command usage
--------------

scripts/client.sh <multi|multiserial> <threadsNb> <iterationsNb> <thinkTime> <invocationType> with 

- multi|multiserial : specifies which type of parameters are passed in to the call : either a simple String or a more complex structure
- threadsNb : threads number in the client program
- iterationsNb : loop iterations number
- thinkTime : pause at each iteration
- invocationType : specifies the type of invocation to do at each iteration. Possibles values are :
  + LookupCreateRemote :
  + CreateRemote
  + Remote
  + MetaData

Ex : scripts/client.sh multi 5 100 0 Remote

Reporting
--------------

Some scripts are provided for generating reporting :
- suiteMulti.sh : launches a suite of tests with the multi client, with all kinds of invocation and different thread numbers. The results are stored in the sub directory 'report'. Ex : suite.sh 200 JR485Cmi multi
- suiteMultiSerial.sh : same as suiteMulti with multiserial client
- synth.sh : Provides some statistics by comparing different reports. Output format is CSV. Ex : synt.sh JR484CmiSingleton JR485CmiSingleton


