Merge "Declare and document $wgStatsdServer and $wgStatsdMetricPrefix"
[lhc/web/wiklou.git] / includes / profiler / output / ProfilerOutputText.php
index b24bbef..dc24f18 100644 (file)
@@ -35,7 +35,7 @@ class ProfilerOutputText extends ProfilerOutput {
                parent::__construct( $collector, $params );
                $this->thresholdMs = isset( $params['thresholdMs'] )
                        ? $params['thresholdMs']
-                       : .25;
+                       : 1.0;
        }
        public function log( array $stats ) {
                if ( $this->collector->getTemplated() ) {
@@ -43,11 +43,11 @@ class ProfilerOutputText extends ProfilerOutput {
 
                        // Filter out really tiny entries
                        $min = $this->thresholdMs;
-                       $stats = array_filter( $stats, function( $a ) use ( $min ) {
+                       $stats = array_filter( $stats, function ( $a ) use ( $min ) {
                                return $a['real'] > $min;
                        } );
                        // Sort descending by time elapsed
-                       usort( $stats, function( $a, $b ) {
+                       usort( $stats, function ( $a, $b ) {
                                return $a['real'] < $b['real'];
                        } );
 
@@ -69,9 +69,7 @@ class ProfilerOutputText extends ProfilerOutput {
                                } else {
                                        print "<!--\n{$out}\n-->\n";
                                }
-                       } elseif ( $contentType === 'text/javascript' ) {
-                               print "\n/*\n${$out}*/\n";
-                       } elseif ( $contentType === 'text/css' ) {
+                       } elseif ( $contentType === 'text/javascript' || $contentType === 'text/css' ) {
                                print "\n/*\n{$out}*/\n";
                        }
                }