Changing POST data used by Apache Bench per iteration

后端 未结 3 2213
南笙
南笙 2021-02-12 12:59

I\'m using ab to do some load testing, and it\'s important that the supplied querystring (or POST) parameters change between requests.

I.e. I need to make requests to UR

3条回答
  •  既然无缘
    2021-02-12 13:53

    Add my recommendation for jMeter...it works very well!

    You could also create a script that creates a second script with something like:

    ab -n 1 -c 1 'http://yoursever.com/method?param=0' & ab -n 1 -c 1 'http://yoursever.com/method?param=1' & ab -n 1 -c 1 'http://yoursever.com/method?param=2' & ab -n 1 -c 1 'http://yoursever.com/method?param=3' & ab -n 1 -c 1 'http://yoursever.com/method?param=4' &

    But that's only really useful if you're trying to simulate load and observe your server. The actual benchmarks will have to be collated if you want to check ab performance. At that point I'd just use jMeter. For my use, I just need to simulate load and the ab processes are light enough that running 100 like this is no problem.

提交回复
热议问题