Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page Speed - Test Script response speed

I made a website recent and it's loading very slow. My Firebug Page Speed Score is 82/100. I think this is good. My website has 2 images and they have 100KB and some other small images for bullets, arrows and stuff that have not more that 50KB. Anyway, my point is that the html is quite fast, but I have this html as a Wordpress theme and a new host (cheap one).

My question: How can I find the time for my Wordpress (or any PHP script) to echo out the page requested.

Can I know for sure if the hosting or the script that is making my page work slow?

Thank you!

like image 605
Adrian Florescu Avatar asked May 22 '26 18:05

Adrian Florescu


2 Answers

time your script?

<?php
$start = microtime(true);

  //your script here

$end = microtime(true);
$time = $end - $start;
echo('script took ' . $time . ' seconds to execute.');
?>
like image 79
dan Avatar answered May 25 '26 07:05

dan


I use Fiddler for this. It is a handy tool that can accurately time the entire request and response, to and from the server.

Just open Fiddler, go to your site, select all of the requests related, and click the statistics tab.

like image 26
Brad Avatar answered May 25 '26 08:05

Brad