1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 04:40:44 +02:00

Support cpu-usage rendertime

This commit is contained in:
mrpete
2007-03-04 21:47:15 +00:00
parent 5a5db93464
commit 03d9805187

View File

@@ -1,4 +1,4 @@
<?php <?php
/* /*
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/class2.php,v $ | $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.15 $ | $Revision: 1.16 $
| $Date: 2007-02-12 20:04:46 $ | $Date: 2007-03-04 21:47:15 $
| $Author: e107steved $ | $Author: mrpete $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
// //
@@ -43,6 +43,7 @@
// A: Honest global beginning point for processing time // A: Honest global beginning point for processing time
// //
$eTimingStart = microtime(); // preserve these when destroying globals in step C $eTimingStart = microtime(); // preserve these when destroying globals in step C
if ( function_exists( 'getrusage' ) ) { $eTimingStartCPU = getrusage(); }
$oblev_before_start = ob_get_level(); $oblev_before_start = ob_get_level();
// //
@@ -64,7 +65,7 @@ if(function_exists('ini_get')) {
// Destroy! (if we need to) // Destroy! (if we need to)
if($register_globals == true){ if($register_globals == true){
while (list($global) = each($GLOBALS)) { while (list($global) = each($GLOBALS)) {
if (!preg_match('/^(_POST|_GET|_COOKIE|_SERVER|_FILES|GLOBALS|HTTP.*|_REQUEST|retrieve_prefs|eplug_admin|eTimingStart)|oblev_.*$/', $global)) { if (!preg_match('/^(_POST|_GET|_COOKIE|_SERVER|_FILES|_SESSION|GLOBALS|HTTP.*|_REQUEST|retrieve_prefs|eplug_admin|eTimingStart.*|oblev_.*)$/', $global)) {
unset($$global); unset($$global);
} }
} }