Merge "Add final tests for the Status class"
[lhc/web/wiklou.git] / includes / profiler / ProfilerSimpleTrace.php
index f766a39..5588d1e 100644 (file)
@@ -59,6 +59,8 @@ class ProfilerSimpleTrace extends ProfilerSimple {
                        $elapsedreal = $this->getTime() - $ortime;
                        $this->trace .= sprintf( "%03.6f %6.1f", $elapsedreal, $this->memoryDiff() ) .
                                        str_repeat( " ", count( $this->mWorkStack ) + 1 ) . " < " . $functionname . "\n";
+
+                       $this->updateTrxProfiling( $functionname, $elapsedreal );
                }
        }
 
@@ -69,7 +71,7 @@ class ProfilerSimpleTrace extends ProfilerSimple {
        }
 
        function logData() {
-               if ( php_sapi_name() === 'cli' ) {
+               if ( PHP_SAPI === 'cli' ) {
                        print "<!-- \n {$this->trace} \n -->";
                } elseif ( $this->getContentType() === 'text/html' ) {
                        print "<!-- \n {$this->trace} \n -->";