summaryrefslogtreecommitdiff
path: root/includes/ProfilerStub.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
commit183851b06bd6c52f3cae5375f433da720d410447 (patch)
treea477257decbf3360127f6739c2f9d0ec57a03d39 /includes/ProfilerStub.php
MediaWiki 1.7.1 wiederhergestellt
Diffstat (limited to 'includes/ProfilerStub.php')
-rw-r--r--includes/ProfilerStub.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/includes/ProfilerStub.php b/includes/ProfilerStub.php
new file mode 100644
index 00000000..3bcdaab2
--- /dev/null
+++ b/includes/ProfilerStub.php
@@ -0,0 +1,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() {}
+function wfLogProfilingData() {}
+
+?>