Update the Chinese conversion tables.
[lhc/web/wiklou.git] / includes / ProfilerStub.php
1 <?php
2 /**
3 * Stub profiling functions
4 * @file
5 * @ingroup Profiler
6 */
7
8 /** backward compatibility */
9 $wgProfiling = false;
10 $wgProfiler = null;
11
12 /** is setproctitle function available ? */
13 $haveProctitle = function_exists( 'setproctitle' );
14
15 /**
16 * Begin profiling of a function
17 * @param $fn string
18 */
19 function wfProfileIn( $fn = '' ) {
20 global $hackwhere, $wgDBname, $haveProctitle;
21 if( $haveProctitle ){
22 $hackwhere[] = $fn;
23 setproctitle( $fn . " [$wgDBname]" );
24 }
25 }
26
27 /**
28 * Stop profiling of a function
29 * @param $fn string
30 */
31 function wfProfileOut( $fn = '' ) {
32 global $hackwhere, $wgDBname, $haveProctitle;
33 if( !$haveProctitle )
34 return;
35 if( count( $hackwhere ) )
36 array_pop( $hackwhere );
37 if( count( $hackwhere ) )
38 setproctitle( $hackwhere[count( $hackwhere )-1] . " [$wgDBname]" );
39 }
40
41 /**
42 * Does nothing, just for compatibility
43 */
44 function wfGetProfilingOutput( $s, $e ) {}
45
46 /**
47 * Does nothing, just for compatibility
48 */
49 function wfProfileClose() {}