autobench 測試筆記

yum install texinfo
yum install gnuplot

#下載 http://httperf.googlecode.com/files/httperf-0.9.0.tar.gz

tar zfvx httperf-0.9.0.tar.gz
./configure
make && make install


# 下載 Autobench
wget https://github.com/menavaur/Autobench/archive/master.zip
mv master.zip autobench.zip
unzip autobench.zip
cd Autobench-master
make && make install


cp /usr/local/bin/bench2graph /usr/local/bin/bench2png
sed -i 's/postscript color/png xffffff/g' /usr/local/bin/bench2png

# 生成測試文件

/usr/local/bin/autobench  --single_host \
    --host1 192.168.0.2 --port1 80 --uri1 /index/test \
    --quiet --low_rate 10 --high_rate 100 --rate_step 10 \
    --num_call 1 --num_conn=100 --timeout=10 \
    --file result.tsv
    
#參數含義
--signle_host 只測單機
--host1 主機地址
--port1 端口
--uri1 測試URI
--quiet 安靜模式
--low_rate 測試時最低請求數
--hight_rate 測試時最高請求數
--rate_step 每次測試請求數增長步長
--num-call 同httperf [建立鏈接數]
--num_conn 同httperf [每一個鏈接發送多少請求]
--timeout 連接超時
--file 測試結果輸出的 tsv文件



    
# 把測試文件轉圖
bench2png results.tsv results.png




# ERROR: Could not find/open font when opening font "arial",
wget ftp://ftp.pbone.net/mirror/olea.org/msttcore-fonts-2.0-6.noarch.rpm
rpm -ivh msttcore-fonts-2.0-6.noarch.rpm
export GDFONTPATH="/usr/share/fonts/msttcore"
export GNUPLOT_DEFAULT_GDFONT="arial"
相關文章
相關標籤/搜索