Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 47 lines (35 sloc) 2.268 kB
39d04d3 @igrigorik initial import
authored
1 Autoperf is a ruby driver for httperf, designed to help you automate load and performance
2 testing of any web application - for a single end point, or through log replay.
3
36f5ae5 @pauldowman Fixed URL and updated sample output to include new "5xx status" column.
pauldowman authored
4 More: http://www.igvita.com/2008/09/30/load-testing-with-log-replay/
d9167dd @igrigorik updated readme
authored
5
39d04d3 @igrigorik initial import
authored
6 To get started, first download & install httperf:
7 http://www.hpl.hp.com/research/linux/httperf/
8
9 Next, either run a simple test straight from the command line (man httperf), or create
10 an execution plan for autoperf. If you want to replay an access log from your production
11 environment, follow these steps:
12
13 # grab last 10000 lines from nginx log, and extract a certain pattern (if needed)
14 tail -n 10000 nginx.log | grep "__pattern__" > requests
15
16 # extract the request path (ex. /homepage) from the log file
17 awk '{print $7}' requests > requests_path
18
19 # replace newlines with null terminators (httperf format)
20 tr "\n" "\0" < requests_path > replay_log
21
22 Next, configure your execution plan (see sample.conf), and run autoperf:
23 ruby autoperf.rb -c sample.conf
24
25 Sample output:
36f5ae5 @pauldowman Fixed URL and updated sample output to include new "5xx status" column.
pauldowman authored
26 +-----------------------------------------------------------------------------+
27 | rate | conn/s | req/s | replies/s avg | errors | 5xx status | net io (KB/s) |
28 +-----------------------------------------------------------------------------+
29 | 100 | 99.9 | 99.9 | 99.7 | 0 | 0 | 45.4 |
30 | 120 | 119.7 | 119.7 | 120.0 | 0 | 0 | 54.4 |
31 | 140 | 139.3 | 139.3 | 138.0 | 0 | 0 | 63.6 |
32 |> 160 | 151.9 | 151.9 | 147.0 | 0 | 0 | 69.3 |
33 | 180 | 132.2 | 129.8 | 137.4 | 27 | 0 | 59.6 |
34 | 200 | 119.8 | 117.6 | 139.9 | 31 | 14 | 53.9 |
35 +-----------------------------------------------------------------------------+
df0b9ce @dvrensk Option to use different request files for each run.
dvrensk authored
36
37 If your server uses caching, making it pointless to run the same requests over
38 and over, you can use different requests for each run.
39
40 # Create 10 1000-line files (xa, xb, xc etc)
41 split -a 1 requests_path
42
43 # Convert to null-terminated strings
44 for x in x?; do tr "\n" "\0" < $x > $x.nul; done
45
46 # run as before, but use the `wlog` line instead of `httperf_wlog` in the conf file
30ddd85 @igrigorik Merge branch 'master' of git://github.com/pauldowman/autoperf
authored
47 ruby autoperf.rb -c sample.conf
Something went wrong with that request. Please try again.