Tutorial :ISP Agnostic Speed Testing


What is the best way to test the speed of a LAMP based site, without factoring in the user's connection?

In other words, I have a CMS and I want to see how long it takes for PHP and MySQL to do all their work.

Additionally I do not have shell access to the server, it is in a shared hosting environment.


The best way in this case is to let the server count itself. Wrap your CMS code to store the time the operation started, then substract it from the current time at the end of the script and print it.

You can use this code to read the time value:

function curtime()  {          $tm = explode(' ', microtime());          return $tm[1] + $tm[0];  }  


This can actually be quite a complicated thing to test, if you want an answer that matters to the user rather than the engineer. Keynote Systems does this sort of thing professionally. (Disclaimer: I almost took a job with them a long time ago, but haven’t talked to them in years.)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »