AJAX app to test the performance of your AJAX apps

Ever wondered how your AJAX applications would perform under a load test, but can’t/won’t buy an expensive load testing tool? I got tired of wondering so I figured out how I could create an AJAX application to test my AJAX applications. Nothing professional grade, but it can answer some of my performance questions. It uses the YUI libraries for connectivity, Jack Slocum’s Web 2.0 layout libraries, and Walter Zorn’s javascript vector graphics libraries for the result charting.

First thing is first; this is an application that runs in a browser so it is limited by the restrictions of browsers such as the number of concurrent open connections. You will need to follow some of the advice from this O’Reilly article to better configure your browser for concurrent connections.

Anyway, I have packaged the application as a Domino application, and as a standalone HTML app, with the demo here. The Domino version uses a page within the same application for sample purposes, and the HTML version has an XML file. Thanks to Jake Howlett for packaging the YUI libraries into a Domino app, I have also added Jack Slocum’s YUI extension libraries.

The application uses the YUI connection library, and makes use of the Transaction ID that YUI assigns to each request. Since the requests sent out do not always return in the same order, this ID is critical to tracking the performance of each request.

The applications allows for GET and POSTS requests, and you can use different parameter sets for each request. Also, it stores the parameter string and response text of each request so that after all the requests have returned, you can use a custom function to determine if the request was a success. If you need to get around server side caching by creating unique URLs, there is a checkbox that will append a unique, time-based string onto the querystring.

The only portion that is not working is the credentialing request that, when finished, will hit the specified endpoint with a POST/GET request to authenticate the following requests.

By the way, you have to refresh the page between tests! Still working out what that issue is.

Let me know how things work, and please send back any improvements you make. Otherwise I will never learn!

 

2 Responses to “AJAX app to test the performance of your AJAX apps”

  1. Jack Slocum Says:

    This looks great. Is there any chance you could put up a demo site where it can be seen without installing?

  2. Administrator Says:

    I put the demo up here:

    http://www.crossedconnections.org/samples/perfTest/measureMeDemo.html

    I will soon make the end point an actual AJAX/PHP page, but work calls………

Leave a Reply