X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fprofiler%2FProfilerSimpleTrace.php;h=893d9605a28fc9be31a1318a7419bc42b6262ed0;hb=7ceeaa22084213668697785c6b174464442e9581;hp=2a4449483c577602a61bc761cfc8d8f0fd0a09e7;hpb=33ee355b267f1af5fbf5b81783536aa5d63471dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php index 2a4449483c..893d9605a2 100644 --- a/includes/profiler/ProfilerSimpleTrace.php +++ b/includes/profiler/ProfilerSimpleTrace.php @@ -30,19 +30,15 @@ class ProfilerSimpleTrace extends ProfilerStandard { protected $trace = "Beginning trace: \n"; protected $memory = 0; - protected function collateOnly() { - return true; - } - public function profileIn( $functionname ) { parent::profileIn( $functionname ); $this->trace .= " " . sprintf( "%6.1f", $this->memoryDiff() ) . - str_repeat( " ", count( $this->mWorkStack ) ) . " > " . $functionname . "\n"; + str_repeat( " ", count( $this->workStack ) ) . " > " . $functionname . "\n"; } public function profileOut( $functionname ) { - $item = end( $this->mWorkStack ); + $item = end( $this->workStack ); parent::profileOut( $functionname ); @@ -59,7 +55,7 @@ class ProfilerSimpleTrace extends ProfilerStandard { } $elapsedreal = $this->getTime() - $ortime; $this->trace .= sprintf( "%03.6f %6.1f", $elapsedreal, $this->memoryDiff() ) . - str_repeat( " ", count( $this->mWorkStack ) + 1 ) . " < " . $functionname . "\n"; + str_repeat( " ", count( $this->workStack ) + 1 ) . " < " . $functionname . "\n"; } } @@ -70,14 +66,15 @@ class ProfilerSimpleTrace extends ProfilerStandard { } public function logData() { - if ( $this->mTemplated ) { + if ( $this->templated ) { + $contentType = $this->getContentType(); if ( PHP_SAPI === 'cli' ) { print ""; - } elseif ( $this->getContentType() === 'text/html' ) { + } elseif ( $contentType === 'text/html' ) { print ""; - } elseif ( $this->getContentType() === 'text/javascript' ) { + } elseif ( $contentType === 'text/javascript' ) { print "\n/*\n {$this->trace}\n*/"; - } elseif ( $this->getContentType() === 'text/css' ) { + } elseif ( $contentType === 'text/css' ) { print "\n/*\n {$this->trace}\n*/"; } }