SWBench - A Simple Webserver Benchmark program
Copyright 1998 by Lars Hoss (lars.hoss@munich.netsurf.de)

See the files "COPYING" and "Copyright" for additional information 


What is SWBench?
----------------

SWBench is a very simple program to measure the hit rate of a given webserver.
Hit rate means the the capability to serve pages as many as possible per 
second. It uses the UNIX fork() system function to clone itself. Then each 
child runs a loop where it tries to get the page index.html from the webserver. 
Whenever a child gets  a page, it writes its result into a shared memory 
segment. When pressing control+c the program stops and adds the result
of all childs togehter. By dividing the total result through the elapsed time
of the benchmark the average hit rate is calculated.
SWBench is free and licensed under the GPL.

Why do I have written it?
-------------------------

My employers decided to set up their own internet webserver.
We wanted to measure the performance of our system and how it 
changes by modifing some parameters. So I started to write my
own benchmark program. 
Furthermore I wanted to learn how things like shared memory and
fork() do work.


Installation
------------

Just modify the Makefile to suit your settings and type:

make

Normaly the settings coming with the Makfile should work for you.
If you have problems to compile it, please send me a mail.


Running SWBench
---------------

SWBench was designed to run from the command line.
You can specify the name of server, the port to use and number of
childs to clone. Beware of specifing to many childs! It may crash your
system. 


Command Line Options
--------------------

-h	Display all aviable command line options end exit program.

-c	Number of childs to clone. Do specifiy to much! It may crash
	your system!

-p	By default port 80 is used. This is normaly the port which is
 	used by webservers. With this option you can alter this setting.

-v	Print some information about SWBench and exit program.

-r      file with content to replay. Instead of just asking for
	"GET /<CR>", the content of the file is being send.

TODO
----

Well, I know there are a lot of things to do. If you have some ideas
or special wishes, send me a mail and I will see what to do :-)
