Monday, August 2, 2010

A simple, little web load tool

There are many ways of doing performance testing of web applications. In the good ol’ days I remember starting up Microsofts Application Center Test (ACT) and recording some vbscripts that could later be executed. Nowadays ACT is a lot sexier – but now it comes with Visual Studio 2010 but unfortunately only in Ultimate edition. I tried to persuade my wife to spend the $11000 on the ultimate edition – but she failed to see why this was more important than buying her a car.

Another good option is to use WebLoad. It’s a neat tool – and even if you buy it (to actually get a compiled and running version instead of the do-it-yourself-open-source) it still comes at a more decent price point. I recently played around with it – and it does solve a lot of your performance testing needs – but it’s almost a bit too much overkill for my need (which is essentially to find out how many request/s a web site can handle). I also didn’t like that it hijacked all my browsers and forced them to go through a proxy (in order for it to record what was going on) – and then failing to reset the proxy selection afterwards.

In the end I decided to spend the 30 min it would take to do a simple little performance tester of my own – that does exactly what I want it to.

I came up with AWebLoadTesting which is a compact and ultra-simple console app. It takes an input file which is essentially a text file with a list of urls to visit for each visitor during the test, an output filename – in which it will put a csv file with saved statistics – and that’s about it. If you need to you can also specify a hostname to run the test against – and even a custom UserAgent for the requests.

image

When it starts you have 0 visitors active. Then, by pressing “+” you can add visitors one at a time – and by pressing “1” and “5” you can add chunks of 10 or 50 visitors at a time. Each visitor is started in its own thread and will continuously go through the urls from the input file again and again.

“u” updates your view, “r” resets the counters", “s” saves the current data to the output file, “-“ removes a visitor” and of course “q” quits.

You’ll constantly be presented with the measured numbers: Time measured (s), Requests / s, Visitor count, Max load time, average load time and min. load time. On top of that it will show you a prioritized list of which urls are the slowest to return. That’s it.

The screenshot above is a test against a local EPiServer CMS 6.0 web site on my laptop, running with ASP.NET caching turned on (Set cache-expiration to 1h in episerver.config, site settings).

Download the binary here and the entire project here. Use AS-IS, LGPL 2.0, Quick&Dirty.

18 comments:

Deane said...

Bring back WAST!!

建茂恒霖 said...

鞋匠能作好鞋子,因為他只做鞋,不做別的。.......................................................

智鄭鄭堯智鄭鄭堯 said...

Learning makes life sweet.......................................................................

红十字 said...

享受你自己的生活,不要與他人相比。......................................................

承王蓁 said...

好看耶~一定每天有空給你支持..................................................

于庭吳 said...

Subtlety is better than force. ......................................................................

靜蔡蔡蔡蔡怡 said...

喜歡看大家的文章,每篇都是一個故事,都是一種心情~~祝大家開心愉快...............................................................

孫邦柔 said...

善言能贏得聽眾,善聽才能贏得朋友。......................................................................

黃英吳思潔吳思潔邦 said...

No pains, no gains.......................................................................

Jessica said...

Barrister Global Services Scam

Daniel Berg said...

Just what I needed. Thanks Allan!

Jessica said...

Barrister Global Services Scams

alina said...

Barrister Global Services Network, one of premier provider of IT solutions, printer repair , Printer

Service
, managed print services, Barrister Global

Services
. Printing services as printer repair and Managed Print Services are among the best services provided by barrister.

Lindasy Rosenwald said...

Nice blogging, My review is very good example.
Lindsay Rosenwald http://www.lindsay-rosenwald.net/ Dr. Lindsay Rosenwald is one of the re-known venture capitalists and the hedge fund managers in the world.

John said...

Nice Blogging,
UTAH : Utah Web Design http://www.adaptivitypro.com/utah-web-design/

John said...

Very good blogging,
Utah SEO http://www.adaptivitypro.com/utah-web-design/

David said...

Buck Reed http://www.buckreedmlm.com/buckreedmlm.html MLM coach Buck Reed

Business Innovation said...

Really a good article