Getting started with autobench
Preface
We often use loadrunner for performance testing, but sometimes loadrunner can't do some performance testing, so we need other tools. Today, I'll introduce you to an autobench.
Brief introduction
Autobench is a Perl script based on httperf. It will call httperf many times in a test to test the web server, increase the number of concurrent connections according to the given parameters each time, and save the test results of httperf as a file in CSV format, which can be read directly by Excel to facilitate the generation of test reports. With the help of autobench's own bench3graph tool, you can generate a beautiful comparison diagram of test results.
1. Install Httperf first
Download: http://code.google.com/p/httperf/downloads/list
Tar xvzf httperf-0.9.0.tar.gz
Cd httperf-0.9.0
. / configure
Make & & make install
2. Install gnuplot
Download: http://www.gnuplot.info/download.html
Tar xvzf gnuplot-4.2.0.tar.gz
Cd gnuplot-4.2.0
. / configure
Make & & make install
Cp / usr/local/bin/bench3graph / usr/local/bin/bench3png
Sed-I 's/postscript color/png xffffff/g' / usr/local/bin/bench3png
Note that it must be opened here: echo set data style linespoints > > gnuplot.cmd
3. Install autobench
Download: http://www.xenoclast.org/autobench/downloads/autobench-2.1.2.tar.gz
Tar xvzf autobench-2.1.2.tar.gz
Cd autobench-2.1.2
Make & & make install
4. Use
4.1 Test a single host
. / autobench\
-- single_host\
-- host1=your_ip\
-- port1=80\
-- uri1=/home/www/mysql_con.php\
-- quiet\
-- low_rate=5\
-- high_rate=100\
-- rate_step=5\
-- num_call=5\
-- num_conn=1000\
-- timeout=10\
-- file / tmp/con_results.tsv
4.2 Test multiple machines
. / autobench\
-- host1=your_ip1\
-- port1=80\
-- uri1=/home/www/mysql_con.php\
-- host2=your_ip2\
-- port2=80\
-- uri2=/home/www/mysql_pcon.php\
-- quiet\
-- low_rate=5\
-- high_rate=100\
-- rate_step=5\
-- num_call=5\
-- num_conn=1000\
-- timeout=10\
-- file / tmp/results.tsv
4.3 the meaning of parameters
-- signle_host tests only stand-alone machines
-- host1 test host address
-- uri1 host1 Test URI
-- quiet quiet mode
-- minimum number of requests during low_rate testing (refers to httperf)
-- maximum number of requests for hight_rate testing
-- rate_step increases the step size of each test request
-- num-call and httperf
-- num_conn and httperf
-- tsv file of file test result output
4.4 generate pictures
Bench3png results.tsv results.png
5. Reference articles
Http://www.xenoclast.org/autobench/
Http://www.xenoclast.org/autobench/man/autobench.html#index
Http://blog.chinaunix.net/uid-20587912-id-405065.html
Http://hi.baidu.com/malele2008/blog/item/48d63e547a96cf4fd0090681.html
Http://html.conclase.net/cp/scripts/mod_block_worms/bench.html
Http://zbylovecool.blog.51cto.com/2515860/658593