Refactored entry points to have uniform shutdown handling
[lhc/web/wiklou.git] / includes / profiler / Profiler.php
index dbf80fa..9983fec 100644 (file)
@@ -230,6 +230,21 @@ abstract class Profiler {
                }
        }
 
+       /**
+        * Output current data to the page output if configured to do so
+        *
+        * @throws MWException
+        * @since 1.26
+        */
+       public function logDataPageOutputOnly() {
+               foreach ( $this->getOutputs() as $output ) {
+                       if ( $output instanceof ProfilerOutputText ) {
+                               $stats = $this->getFunctionStats();
+                               $output->log( $stats );
+                       }
+               }
+       }
+
        /**
         * Get the content type sent out to the client.
         * Used for profilers that output instead of store data.