Here I will be discussing AutoPerf  in brief and will go through the installation procedure and load test a simple Web Service. AutoPerf is an automated Load generator and Profiler for Web applications. The 2 modules viz. Master and Profiler act together to generate load and profile applications, which collects performance metrics based on a minimal given input via an XML file. When you want to load test a Web service residing on a machine remotely, you have to install the Master module on a Client machine, and the ‘prof agent’ at the server machine, where the Web service is deployed.
Autoperf currently works only on a Linux Operating System, so here we will install AutoPerf on Ubuntu 10.04 Lucid.
To begin with, on the Client machine where you would run the Master module, you need to have Java installed along with the CLASSPATH set to something like this in the /.bashrc file ” export CLASSPATH=/home/aditya/Desktop/AutoPerf-Shrirang/AutoPerf-Master/code/jar/log4j-1.2.13.jar:/home/aditya/Desktop/AutoPerf-Shrirang/AutoPerf-Master/code/class “.
The AutoPerf-Master folder structure should look like this :
The input.xml file is the one that we will be using with the Load Generator as the input file. Also ensure that the XML file is consistent in terms of tags and parameters. The input.xml specifies the following :
– Transaction name ( i.e the operation / Web service to be invoked )
– Target URL address of the Web service
– No. of Concurrent users
– Think time in milli seconds
– IP address of the Server machine
– Port address at which the prof agent is running
A sample input.xml file looks like this :
Now, lets take a look at the Server Machine. To setup the Profiler agent on the Server, you must begin by installing the standard package and libraries of ‘gcc’ ( libgcc ) from the Synaptic manager, otherwise you will run into errors while initializing the prof agent.
The folder structure for the Linux Profiler on the server should look like this :
Once the packages have been installed on both, the client and server side, you are ready to start load testing applications provided you have your webservices up and running. Also, take care to see if the input.xml file is not missing any tags, else you would run into parsing errors.
To start load generator using the Master, you first need to initialize the prof agent at the server side. This can be done using the command ‘ sudo ./prof -d 2011’ . Execute this comment when you’re inside the LinuxProfiler directory as show above. Executing this command starts the prof agent at the port 2011. This now means that the agent will pick up any incoming requests at this port address, and will profile the Webservice which is hosted at some particular web address.
However, you need to start the Master component from the client machine using the following command ‘ sudo java Master input.xml’ . Executing this command will parse the input.xml and start the load generation ( load testing ) based on the parameters of the input.xml file ( no. of users etc ) .
Lets now take a look at the profiling of a sample Complex Addition web service deployed at the server side.
Make sure the prof is running at the server. This can be verified using the ‘ps’ command, and will look like this :
At the client side, you will start the load generator, and will see an output like this :
Once you get such an output , it means that the prof agent has captured all the performance metrics and sent the output to the Master module. When the ‘java Master input.xml’ command is issued at the client machine, the Webservice at the specified URL is invoked by 10 concurrent users, with a think time of 1000 msec. Therefore, the output generated is at that load level.
 AutoPerf : An Automated Load Generator and Performance Measurement tool for multi-tier software systems