How to simulate more than 1 request(i.e. 4000 or more) on a single page to test performance?

mysql, performance, php

Solution

For simple load testing, you might want to try Apache Bench. It's most likely already installed on your system.

ab -n 4000 -c 10 http://www.yoursite.com/mysql_query_performance.php

That's for 4000 requests performed 10 at a time (concurrently)

Problem

Suppose I have a page called mysql_query_performance.php which contains code to select some records from table and echo it. But I want to know how can I simulate more than 1 request to test the performance of that query? Is this Possible? If yes, How?

Original source