脚本:
#!/bin/bash
rm -rf *.log
for i in {1..5}
do
ab -n 1000000 -c 800 -k http://172.20.3.10/ > $i.log &
done
wait
cat *log | grep "per second" | awk -F'[^0-9]+' '{s+=$2} END {print s}'
几个改进点:
- 使用keepalive
- 单个ab是有性能上限的[......]
脚本:
#!/bin/bash
rm -rf *.log
for i in {1..5}
do
ab -n 1000000 -c 800 -k http://172.20.3.10/ > $i.log &
done
wait
cat *log | grep "per second" | awk -F'[^0-9]+' '{s+=$2} END {print s}'
几个改进点: