开发者

Apache Benchmark - Randomized querystrings?

I need to benchmark a site, and was thinking of using ab (Apache Benchmark) to do it.

We need to hammer it quite hard, and we're interested more in how our app will cope, as opposed to the network bandwidth, hence we're doing it from localhost.

The other thing is, we need to pass in a random list of different query strings:

i.e. http://search.site.com/?q=search_term

Is there any way to pass this in to ap somehow, or an alternative http benchmarker that can do that?

Or will 开发者_如何学Gowe have to write a script to startup multiple instances of ab with different strings? I'd rather have it all run from the same instance of ab, if possible, rather than startup 10,000 instances of ap.

Cheers, Victor


JMeter has a random variable configuration element for HTTP Request sampling.


You can create redirect.php which will contain anything you want. Remember, redirect.php itself will create additional load.

<?

$queries      = array('query1', 'query2');
$query        = $queries[rand(0, count($queries)-1)]
header('Location: http://search.site.com/?q='.urlencode( $query ));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜