* @param $functionname string
*/
function profileIn( $functionname ) {
- global $wgDebugFunctionEntry;
-
+ global $wgDebugFunctionEntry, $wgProfiling;
+ if( !$wgProfiling ) return;
if( $wgDebugFunctionEntry ){
$this->debug( str_repeat( ' ', count( $this->mWorkStack ) ) . 'Entering ' . $functionname . "\n" );
}
* @param $functionname string
*/
function profileOut($functionname) {
- global $wgDebugFunctionEntry;
-
+ global $wgDebugFunctionEntry, $wgProfiling;;
+ if( !$wgProfiling ) return;
$memory = memory_get_usage();
$time = $this->getTime();