s-r-k / perferl

Automatically exported from code.google.com/p/perferl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PERFERL README

Prerequisites:
* Erlang/OTP is installed with the default libraries and "erl" is in the path

Procedure:

Writing tests:

Look at the example tests given in the tests directory and use the same format for writing new tests.
The sructure is :
{"simple-get", get, "http://www.erlang.org"}.
{"simple-post", post, "http://localhost:7080/employeeProcess.do","firstName=karthik&lastName=ramachandra&age=25"}.

The first parameter is just a unique name for that request. Can be any string.Should be unique for each row
The second parameter is either the atom "get" or "post". Request method
THe third parameter is the url.
The optional fourth parameter is used only in the case of "post" requests to contain the request body


Running tests:

Modify the run.sh script and update name of the test case (.perferl file). Perferl assumes that that file resides in
the "tests" directory.
Run the script run.sh with the process count and ramp up time as arguments.

Eg: ./run.sh 100 10
This will simulate 100 users ramping up at 10 seconds. i.e at the end of the 10th second, the 100th user comes alive.
By default it is configured to run tests/web_requests.perferl which just hits a couple of websites with some deliberate failures.

Just do a couple of <Ctrl-c>s to stop perferl once it says test run completed.


The results show something like this:
Stats:[["http://localhost:3000/erl/say","149","149","149"],
       ["http://localhost:8080/hello","32","32","32"],
       ["http://www.erlang.org","914","914","914"],
       ["http://images.google.co.in/imghp?ie=UTF-8&oe=UTF-8&hl=en&tab=wi&q=","868","868","868"],
       ["http://karthiksr.blogspot.com","15744","15744","15744"],
       ["http://www.google.com","497","497","497"]]

THis means: [[<url1>, <avg time taken>, <min>, <max>],
             [<url2>,....]
             [<url3>,....]
             ....]

Notes:
*The code might have references to hardcoded paths as it is still work in progress.

Any questions/bugs/feature requests? - mailto:reachsrk@gmail.com

About

Automatically exported from code.google.com/p/perferl


Languages

Language:Erlang 64.2%Language:HTML 29.1%Language:JavaScript 6.1%Language:Shell 0.4%Language:CSS 0.1%Language:Makefile 0.1%Language:Batchfile 0.0%