summaryrefslogtreecommitdiff
path: root/includes/ProfilerStub.php
blob: 4cf0aa4494ad16894cd7dcda4e6b424e6ed847e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

# Stub profiling functions

$haveProctitle=function_exists("setproctitle");
function wfProfileIn( $fn = '' ) {
	global $hackwhere, $wgDBname, $haveProctitle;
	if ($haveProctitle) {
		$hackwhere[] = $fn;
		setproctitle($fn . " [$wgDBname]");
	}
}
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]");
}
function wfGetProfilingOutput( $s, $e ) {}
function wfProfileClose() {}
$wgProfiling = false;

?>