X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fprofiler%2FProfilerStub.php;h=7b310c1364fb68b23badbd5e8fa5d29a371725de;hb=e0983c311b3856a0a733ce746393169cc71f2628;hp=5c826090e06e05bd5d1103ff3706f358994dba18;hpb=21e53d35908782d3f467658ce69abd20ae7c8237;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfilerStub.php b/includes/profiler/ProfilerStub.php index 5c826090e0..7b310c1364 100644 --- a/includes/profiler/ProfilerStub.php +++ b/includes/profiler/ProfilerStub.php @@ -1,61 +1,45 @@ haveProctitle = function_exists( 'setproctitle' ); - } +/** + * Stub profiler that does nothing + * + * @ingroup Profiler + */ +class ProfilerStub extends Profiler { public function isStub() { return true; } - - /** - * Begin profiling of a function - * @param $fn string - */ - public function profileIn( $fn ) { - global $wgDBname; - if( $this->haveProctitle ){ - $this->hackWhere[] = $fn; - setproctitle( $fn . " [$wgDBname]" ); - } - } - - /** - * Stop profiling of a function - * @param $fn string - */ - public function profileOut( $fn ) { - global $wgDBname; - if( !$this->haveProctitle ) { - return; - } - if( count( $this->hackWhere ) ) { - array_pop( $this->hackWhere ); - } - if( count( $this->hackWhere ) ) { - setproctitle( $this->hackWhere[count( $this->hackWhere )-1] . " [$wgDBname]" ); - } + public function isPersistent() { + return false; } - - /** - * Does nothing, just for compatibility - */ + public function profileIn( $fn ) {} + public function profileOut( $fn ) {} public function getOutput() {} public function close() {} + public function logData() {} + public function getCurrentSection() { return ''; } + public function transactionWritingIn( $server, $db ) {} + public function transactionWritingOut( $server, $db ) {} + public function getRawData() { return array(); } }