How do I measure the page load time in a CI application that is using Smarty? Right now, I have put benchmark points at the beginning and end of the index() method, but that only measures the execution time of the method, right? I want to know how long it take to fully render a page.
Just insert {elapsed_time}
into a html view:
like <p>Page rendered in {elapsed_time} seconds.
When you have a fresh install of Codeigniter, just open the default welcoming page. You can find this line in the footer.
CodeIgniter has a Benchmarking class that is always active, enabling the time difference between any two marked points to be calculated.
An alternate way to show your elapsed time in your view files is to use this pseudo-variable ...
I would point you to the Codeigniter Profiler
When used in conjunction to the Benchmarking, it gives you fairly detailed results, this should be exactly what you are looking for.
make sure you adjust your benchmark points to conform to the profiler specs though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With