summaryrefslogtreecommitdiff
path: root/includes/ProfilerSimple.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/ProfilerSimple.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/ProfilerSimple.php')
-rw-r--r--includes/ProfilerSimple.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/includes/ProfilerSimple.php b/includes/ProfilerSimple.php
index 20ab99c0..349a7cac 100644
--- a/includes/ProfilerSimple.php
+++ b/includes/ProfilerSimple.php
@@ -1,18 +1,22 @@
<?php
+/**
+ * @file
+ * @ingroup 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));
@@ -105,7 +109,7 @@ class ProfilerSimple extends Profiler {
if ( function_exists( 'getrusage' ) ) {
if ( $ru == null )
$ru = getrusage();
- return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] + ($ru['ru_utime.tv_usec'] +
+ return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] + ($ru['ru_utime.tv_usec'] +
$ru['ru_stime.tv_usec']) * 1e-6);
} else {
return 0;
@@ -119,11 +123,4 @@ class ProfilerSimple extends Profiler {
list($a,$b)=explode(" ",$time);
return (float)($a+$b);
}
-
- function debug( $s ) {
- if (function_exists( 'wfDebug' ) ) {
- wfDebug( $s );
- }
- }
}
-