<?php
/**
* Stub profiling functions
- * @addtogroup Profiler
+ * @file
+ * @ingroup Profiler
*/
/** backward compatibility */
$wgProfiling = false;
+$wgProfiler = null;
/** is setproctitle function available ? */
$haveProctitle = function_exists( 'setproctitle' );
/**
* Begin profiling of a function
- * @param string $fn
+ * @param $fn string
*/
function wfProfileIn( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
/**
* Stop profiling of a function
- * @param string $fn
+ * @param $fn string
*/
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
- if( !$haveProctitle )
+ if( !$haveProctitle ) {
return;
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
array_pop( $hackwhere );
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
setproctitle( $hackwhere[count( $hackwhere )-1] . " [$wgDBname]" );
+ }
}
/**