Actions

Showing users the page rendertime

From Joomla! Documentation

Revision as of 06:20, 22 August 2008 by Erdsiger (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. Open your template index.php

2. Put the following code next to

<?php
  function getmicrotime() {
  list($usec, $sec) = explode(" ", microtime());
  return ((float)$usec + (float)$sec); }
  $starttime = getmicrotime();
?>

3. Now put the following code near to the bottom of your site (e.g. right before):

<?php
  $endtime = getmicrotime();
  echo"This site was generated in<br />", number_format($endtime-$starttime, 4, ",", "."), " seconds.";
?>