dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge fixes to ?preload= from /branches/conrad/ (cf. bug 5210, r62864, r62035)
[lhc/web/wiklou.git]
/
includes
/
ProfilerStub.php
diff --git
a/includes/ProfilerStub.php
b/includes/ProfilerStub.php
index
edadd5e
..
575fa7e
100644
(file)
--- a/
includes/ProfilerStub.php
+++ b/
includes/ProfilerStub.php
@@
-1,26
+1,49
@@
<?php
<?php
+/**
+ * Stub profiling functions
+ * @file
+ * @ingroup Profiler
+ */
-# Stub profiling functions
+/** backward compatibility */
+$wgProfiling = false;
+$wgProfiler = null;
-$haveProctitle=function_exists("setproctitle");
+/** is setproctitle function available ? */
+$haveProctitle = function_exists( 'setproctitle' );
+
+/**
+ * Begin profiling of a function
+ * @param $fn string
+ */
function wfProfileIn( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
function wfProfileIn( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
- if
($haveProctitle)
{
- $hackwhere[] = $fn;
- setproctitle(
$fn . " [$wgDBname]"
);
-
}
+ if
( $haveProctitle )
{
+ $hackwhere[] = $fn;
+ setproctitle(
$fn . " [$wgDBname]"
);
+ }
}
}
+
+/**
+ * Stop profiling of a function
+ * @param $fn string
+ */
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
-
if (!$haveProctitle
)
-
return;
-
if (count($hackwhere)
)
- array_pop(
$hackwhere
);
- if
(count($hackwhere)
)
- setproctitle(
$hackwhere[count($hackwhere)-1] . " [$wgDBname]"
);
+
if( !$haveProctitle
)
+ return;
+
if( count( $hackwhere )
)
+ array_pop(
$hackwhere
);
+ if
( count( $hackwhere )
)
+ setproctitle(
$hackwhere[count( $hackwhere )-1] . " [$wgDBname]"
);
}
}
+
+/**
+ * Does nothing, just for compatibility
+ */
function wfGetProfilingOutput( $s, $e ) {}
function wfGetProfilingOutput( $s, $e ) {}
-function wfProfileClose() {}
-function wfLogProfilingData() {}
-?>
+/**
+ * Does nothing, just for compatibility
+ */
+function wfProfileClose() {}