(bug 19441) Updated date formatting for Lithuanian
[mediawiki.git] / includes / ProfilerStub.php
blob100cb8df1058519a130971fe1c7a7ad253ad964b
1 <?php
2 /**
3 * Stub profiling functions
4 * @file
5 * @ingroup Profiler
6 */
8 /** backward compatibility */
9 $wgProfiling = false;
11 /** is setproctitle function available ? */
12 $haveProctitle = function_exists( 'setproctitle' );
14 /**
15 * Begin profiling of a function
16 * @param $fn string
18 function wfProfileIn( $fn = '' ) {
19 global $hackwhere, $wgDBname, $haveProctitle;
20 if( $haveProctitle ){
21 $hackwhere[] = $fn;
22 setproctitle( $fn . " [$wgDBname]" );
26 /**
27 * Stop profiling of a function
28 * @param $fn string
30 function wfProfileOut( $fn = '' ) {
31 global $hackwhere, $wgDBname, $haveProctitle;
32 if( !$haveProctitle )
33 return;
34 if( count( $hackwhere ) )
35 array_pop( $hackwhere );
36 if( count( $hackwhere ) )
37 setproctitle( $hackwhere[count( $hackwhere )-1] . " [$wgDBname]" );
40 /**
41 * Does nothing, just for compatibility
43 function wfGetProfilingOutput( $s, $e ) {}
45 /**
46 * Does nothing, just for compatibility
48 function wfProfileClose() {}