Remove per-template profiling
authorChad Horohoe <chadh@wikimedia.org>
Thu, 30 Oct 2014 22:45:24 +0000 (15:45 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 13 Nov 2014 02:18:30 +0000 (18:18 -0800)
Creates absurd dependency on the profiler from the parser. This profiling
is also not compatible with function-level profiling that we're trying to
aim for with xhprof.

Change-Id: I3c780fcb06e3470a0cbf50311ba916a0b67ea49e

includes/profiler/Profiler.php
includes/profiler/ProfilerSimpleDB.php
includes/profiler/ProfilerSimpleUDP.php
includes/profiler/ProfilerStandard.php
includes/profiler/ProfilerStub.php
includes/profiler/ProfilerXhprof.php

index 380d80f..078b66b 100644 (file)
@@ -80,18 +80,6 @@ abstract class Profiler {
         */
        abstract public function isStub();
 
-       /**
-        * Return whether this profiler stores data
-        *
-        * Called by Parser::braceSubstitution. If true, the parser will not
-        * generate per-title profiling sections, to avoid overloading the
-        * profiling data collector.
-        *
-        * @see Profiler::logData()
-        * @return bool
-        */
-       abstract public function isPersistent();
-
        /**
         * @param string $id
         */
index 3625db6..911b926 100644 (file)
  * @ingroup Profiler
  */
 class ProfilerSimpleDB extends ProfilerStandard {
-       public function isPersistent() {
-               return true;
-       }
-
        /**
         * Log the whole profiling data into the database.
         */
index 2671376..ad16a18 100644 (file)
  * @ingroup Profiler
  */
 class ProfilerSimpleUDP extends ProfilerStandard {
-       public function isPersistent() {
-               return true;
-       }
-
        public function logData() {
                global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgUDPProfilerFormatString;
 
index d75ae9e..b873806 100644 (file)
@@ -66,16 +66,6 @@ class ProfilerStandard extends Profiler {
                return false;
        }
 
-       /**
-        * Return whether this profiler stores data
-        *
-        * @see Profiler::logData()
-        * @return bool
-        */
-       public function isPersistent() {
-               return false;
-       }
-
        /**
         * Add the inital item in the stack.
         */
index e81f579..43e2193 100644 (file)
@@ -31,10 +31,6 @@ class ProfilerStub extends Profiler {
                return true;
        }
 
-       public function isPersistent() {
-               return false;
-       }
-
        public function profileIn( $fn ) {
        }
 
index acfe7e0..1e83e27 100644 (file)
@@ -127,11 +127,6 @@ class ProfilerXhprof extends Profiler {
                return false;
        }
 
-       public function isPersistent() {
-               // Disable per-title profiling sections
-               return true;
-       }
-
        /**
         * No-op for xhprof profiling.
         *