From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/profiler/ProfilerSimpleTrace.php | 85 ------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 includes/profiler/ProfilerSimpleTrace.php (limited to 'includes/profiler/ProfilerSimpleTrace.php') diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php deleted file mode 100644 index 2a444948..00000000 --- a/includes/profiler/ProfilerSimpleTrace.php +++ /dev/null @@ -1,85 +0,0 @@ -trace .= " " . sprintf( "%6.1f", $this->memoryDiff() ) . - str_repeat( " ", count( $this->mWorkStack ) ) . " > " . $functionname . "\n"; - } - - public function profileOut( $functionname ) { - $item = end( $this->mWorkStack ); - - parent::profileOut( $functionname ); - - if ( !$item ) { - $this->trace .= "Profiling error: $functionname\n"; - } else { - list( $ofname, /* $ocount */, $ortime ) = $item; - if ( $functionname == 'close' ) { - $message = "Profile section ended by close(): {$ofname}"; - $functionname = $ofname; - $this->trace .= $message . "\n"; - } elseif ( $ofname != $functionname ) { - $this->trace .= "Profiling error: in({$ofname}), out($functionname)"; - } - $elapsedreal = $this->getTime() - $ortime; - $this->trace .= sprintf( "%03.6f %6.1f", $elapsedreal, $this->memoryDiff() ) . - str_repeat( " ", count( $this->mWorkStack ) + 1 ) . " < " . $functionname . "\n"; - } - } - - protected function memoryDiff() { - $diff = memory_get_usage() - $this->memory; - $this->memory = memory_get_usage(); - return $diff / 1024; - } - - public function logData() { - if ( $this->mTemplated ) { - if ( PHP_SAPI === 'cli' ) { - print ""; - } elseif ( $this->getContentType() === 'text/html' ) { - print ""; - } elseif ( $this->getContentType() === 'text/javascript' ) { - print "\n/*\n {$this->trace}\n*/"; - } elseif ( $this->getContentType() === 'text/css' ) { - print "\n/*\n {$this->trace}\n*/"; - } - } - } -} -- cgit v1.2.2