RapidFire is a tool built to test COM/DCOM objects by simulating a controlled multi-user test environment. It has two components, a windows dll (rapidfiredll.dll) which implements the tester functionality and rapidfire.exe which gives a graphical user interface to the application.
Writing objects for RapidFire
It assumes that each user goes through three phases - Initialization, Executions and finally ShutDown. For these three phases it calls functions TestHarness_Init, TestHarness_Execute and TestHarness_Close respectively. In VB the functions declarations will be:
Public Function TestHarness_Init(iClntIdIn As Integer) As Integer
Public Function TestHarness_Execute(iTranId As Long) As Integer
Public Function TestHarness_Close(iClntIdIn As Integer) As Integer
IClntId is the client number. Each simulated user is given an integer id.
ITranId is the transaction number. Each execution is given an integer id starting from 0.
The return codes should be 0 to indicate success or an error code to indicate failure.
The RapidFire Run Parameters
Program Id of Class:
The program id of the class to test as registered in the system registry. Typically it is DllName.ClassName.
Number of Users:
The number of users to simulate for the test. The tool starts a separate thread to execute for each user.
Delay between starting off threads:
This can be set to control the load when the threads are started. RapidFire will wait for the specified amount of time before starting off the next user so that the initialization process is spread over some time period. If the wait time is set to 0, it makes RapidFire wait for the actual initialization process of the previous user to finish before starting another user. All initializations are serialized.
Wait for previous initialization:
Setting this check box on has the same effect as setting the delay between starting off threads to 0. All initializations are serialized.
Overall execution speed:
This controls the rate of execution. The speed is specified in the format number of executions per unit time. The unit time can be in seconds. Typically the unit time is one second. But if a very high rate of execution is required, of the order of 500 per second, then the load distribution is improved by increasing the unit time. However, a large unit time for a normal execution speed will hamper the capability of the system to recover from temporary abnormal delays in executions. A shorter unit time helps in faster recovery.
Per User Queue Size:
If a particular execution for a user is delayed abnormally, then the next chance for the user will be kept in a queue. There is one such queue for each user. This parameter determines the number of requests that can be queued up for a user before they start losing their chance. A bigger queue means better chance of recovering from temporary delays but at the same time less control over the load on the server.
Overall Queue Size:
This parameter controls the number of requests that can be put in queue in the whole system. The overall queue size takes priority over the per user queue size. If this queue is full, no further execution requests will be made until some slots are freed in the queue. A bigger queue means better chance of recovering from temporary delays but at the same time less control over the load on the server.
Specifies the time for which the test is to be run.
The directory under which all log files are to be written. The utility creates a directory named as <current_time><current_date><program_id> under this directory. The current directory of the application is changed to the newly created directory so that even log files created by the class being tested also go into the same directory. RapidFire creates two log files:
Summary.log: Contains global summary information and summary for each client.
Detail.log: Contains detailed report of individual execution statistics of all clients.
Format of Log Files created:
Format of detail log:
Column 1: The client id
Column 2: The system time at which the execution was attempted.
Column 3: The execution number.
Column 4: The wait time for this execution in milliseconds.
Column 5: The execution time in milliseconds.
Column 6: Whether the execution was successful or failed (S - success, F - failure)
Column 7: Message (error string or error code) for this execution.