Project

stresser

0.03
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Wrapper around httperf for stresstesting your app. Runs httperf multiple times with different concurrency levels and generates an executive summary in .csv
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Stresser

This gem is a wrapper around the httperf command which can put all types of loads on a webserver. It's like apachebench, but you can replay log files, define sessions, and so forth.

This gem calls httperf many times with different concurrency settings and parses httperf's output into a csv file, that you can then use to visualize your application's performance at different concurrency levels

Sample graphs

Here's a collection of graphs that this gem currently creates (though you can create your own by creating a YML file that maps columns from the generated csv file to labels for the image).

Installation

First install the gem

$ gem install stresser

Configuration

Please refer to the supplied sample.conf on how to configure stresser. Also, see man httperf as all options in sample.conf beginning with httperf_ go directly to the httperf commands.

Examples

Stresstest

You can call stresser from the command line:

$ stresser -c your_app.conf -o /tmp/stress/result.csv
... lots of httperf output...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Great, now create a graph with
  stresser-grapher -o /tmp/stress /tmp/stress/result.csv
$

You will see the output of the httperf commands that are issued, and a full report will be written to result.csv.

Creating graphs

When you're done, you can create a graph of your testrun like this:

$ stresser-grapher -o /tmp/stress /tmp/stress/result.csv 
Generating stati_per_second to /tmp/stress/2010_10_25_17_28_stati_per_second.png...
Generating replies_per_second to /tmp/stress/2010_10_25_17_28_replies_per_second.png...
Generating errors to /tmp/stress/2010_10_25_17_28_errors.png...
Generating connection_time to /tmp/stress/2010_10_25_17_28_connection_time.png...
Generating cpu to /tmp/stress/2010_10_25_17_28_cpu.png...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Great, now open the images with
  open /tmp/2010_10_25_17_28*.png
$

Log generator

As a little helper to generate log files defining some session workload that requires different urls, stresser-loggen is supplied. Just create a log template named mylog.tpl like this

# My session workload
/users/{{n}}
  /images/foo.gif
  /images/bar.gif
/users{{n}}/dashboard

And then use stresser-loggen to reproduce these lines as often as you like:

stresser-loggen mylog.tpl 100 > mylog.conf

The {{n}} will be replaced with the numbers 0-99.

Tests

Run rake spec to run them tests. Currently, only httperf's output of a session based replay log is parsed, but I will add more.

Thanks

Stresser is based on igvita's autoperf driver for httperf.