Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 812
Hitesh Chavda Avatar asked Jan 26 '10 16:01

Hitesh Chavda


1 Answers

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)

like image 81
Bryan M. Avatar answered Sep 21 '22 09:09

Bryan M.