ChangeSet ID: 31138 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/05/25 23:05:20 Modified files: include : incl.php Log message: Chris Morgan <cmorgan(a)alum.wpi.edu> Add page generation times to the bottom of each page. This should help us figure out which pages take the longest time to generate Patch: http://cvs.winehq.org/patch.py?id=31138 Old revision New revision Changes Path 1.42 1.43 +16 -1 appdb/include/incl.php Index: appdb/include/incl.php diff -u -p appdb/include/incl.php:1.42 appdb/include/incl.php:1.43 --- appdb/include/incl.php:1.42 26 May 2007 4: 5:20 -0000 +++ appdb/include/incl.php 26 May 2007 4: 5:20 -0000 @@ -127,6 +127,12 @@ function apidb_header($title = 0) if ($title) $title = " - $title"; + // grab the starting time + global $sPageGeneratingStartTime; + $sPageGeneratingStartTime = microtime(); + $aStartarray = explode(" ", $sPageGeneratingStartTime); + $sPageGeneratingStartTime = $aStartarray[1] + $aStartarray[0]; + // Display Header include(BASE."include/header.php"); @@ -154,7 +160,16 @@ function apidb_footer() //Close Sidebar and Content Well echo "<br></td></tr></table>\n"; - + + // grab the end of the page generating time + global $sPageGeneratingStartTime; + $sPageGeneratingEndTime = microtime(); + $aEndarray = explode(" ", $sPageGeneratingEndTime); + $sPageGeneratingEndTime = $aEndarray[1] + $aEndarray[0]; + $sTotaltime = $sPageGeneratingEndTime - $sPageGeneratingStartTime; + $sTotaltime = round($sTotaltime,5); + echo "<center>Page loaded in <b>$sTotaltime</b> seconds.</center>"; + // Display Footer if(!isset($header_disabled)) include(BASE."include/"."footer.php");
participants (1)
-
WineHQ