| Junit test to measure some simple performance statistics.
It times a number of iterations of getPort, createOperation,
and executeRequestResponseOperation for each provider. The
results are stored in a properties file to allow each run
to test if the performance has changed since the last run.
The number of iterations to do is determined by the time
each test takes and the TIME_PER_TEST constant. You need
to run it atleast 3 times to get the iterations calculation
to settle on a good value; The MARGIN_OF_ERROR constant
defines how mush variation between run times is ignored
when determining if the performance has changed.
You may need to change the TIME_PER_TEST and MARGIN_OF_ERROR
constants for your machine speed.
For testing you can add futher timing points to the internal
WSIF classes which this test will then monitor and report on.
For example, to time the axis provider invoke method, at the
start of the invoke method add:
Monitor.start( "axisInvoke" );
followed by a stop call at the end of the invoke method:
Monitor.stop( "axisInvoke" );
Monitor points can be paused around unwanted code. For example
with the above monitors in the invoke method, you could exclude
the SOAP call time with:
Monitor.pause( "axisInvoke" );
resp = call.invoke(locationUri, getSoapActionURI());
Monitor.resume( "axisInvoke" );
author: Ant Elder |