Hitesh Chavda
Hitesh Chavda

Reputation: 789

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

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?

Upvotes: 7

Views: 469

Answers (3)

Gordon
Gordon

Reputation: 316969

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.

Upvotes: 5

Bryan M.
Bryan M.

Reputation: 17322

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)

Upvotes: 8

John Rasch
John Rasch

Reputation: 63445

You could use Pylot:

http://www.pylot.org/

Upvotes: 3

Related Questions