views:

100

answers:

3

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?

+2  A: 

You could use Pylot:

http://www.pylot.org/

John Rasch
Thanks John Rasch
Hitesh Chavda
+4  A: 

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)

Bryan M.
Thank you, This works best without any other software downloadAnd ah! Thanks to all, they also right
Hitesh Chavda
+2  A: 

Or you can use Siege

Siege is a regression test and benchmark utility. It can stress test a single URL with a user defined number of simulated users, or it can read many URLs into memory and stress them simultaneously. The program reports the total number of hits recorded, bytes transferred, response time, concurrency, and return status. Siege supports HTTP/1.0 and 1.1 protocols, GET and POST directives, cookies, transaction logging, and basic authentication. Its features are configurable on a per user basis.

Gordon