我想用不同的参数运行apache ab test多次,这些参数将存储在一个数组中。 例如:
$array {10,50,100,500,1000}
for $i in $array
ab -A name:pass -n $i -c $i http://www.google.com/.... > file_$i.txt
虽然重要的是,要开始第i次测试,必须完成之前的测试。
答案 0 :(得分:1)
脱离我的头顶(未经测试)
array=(10 50 100 500 1000)
for i in ${array[@]}; do
ab -A name:pass -n $i -c $i http://www.google.com/.... > file_$i.txt
done