for循环中的apache ab

发布于 2024-10-31 22:50:08 字数 234 浏览 5 评论 0原文

我想使用不同的参数运行 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 个测试,必须完成前一个测试。

I'd like to run apache ab test more times with different parameters that will be stored in an array.
eg.:

$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

While it's important that, to begin the i-th test, the previous test has to be finished.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间不值得 2024-11-07 22:50:08

从我的头顶上下来(未经测试)

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

off the top of my head (untested)

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文