<?php
+/**
+ * @file
+ * @ingroup Profiler
+ */
-require_once(dirname(__FILE__).'/Profiler.php');
+if ( !class_exists( 'Profiler' ) ) {
+ require_once(dirname(__FILE__).'/Profiler.php');
+}
/**
* Simple profiler base class.
* @todo document methods (?)
- * @addtogroup Profiler
+ * @ingroup Profiler
*/
class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
var $mProfileID = false;
function __construct() {
- global $wgRequestTime,$wgRUstart;
+ global $wgRequestTime, $wgRUstart;
if (!empty($wgRequestTime) && !empty($wgRUstart)) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart));
list($a,$b)=explode(" ",$time);
return (float)($a+$b);
}
-
- function debug( $s ) {
- if (function_exists( 'wfDebug' ) ) {
- wfDebug( $s );
- }
- }
}