From: Chad Horohoe Date: Thu, 30 Oct 2014 22:18:22 +0000 (-0700) Subject: Remove collateOnly() from ProfilerStandard and subclasses X-Git-Tag: 1.31.0-rc.0~13431 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=b6be73dd87c6450885c40b87cb6eac159220fba3;p=lhc%2Fweb%2Fwiklou.git Remove collateOnly() from ProfilerStandard and subclasses All implementations had this set to true, so remove the needless abstraction and function calls. Child classes that do want to differentiate here can just set the member variable on construction. Change-Id: I81a4e6605bdec1fc1a977b5aa1ee1c5853d5ca5b --- diff --git a/includes/profiler/ProfilerSimpleDB.php b/includes/profiler/ProfilerSimpleDB.php index 7ef0ad05c5..5e62f7c8b4 100644 --- a/includes/profiler/ProfilerSimpleDB.php +++ b/includes/profiler/ProfilerSimpleDB.php @@ -27,10 +27,6 @@ * @ingroup Profiler */ class ProfilerSimpleDB extends ProfilerStandard { - protected function collateOnly() { - return true; - } - public function isPersistent() { return true; } diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index 0ee7aad23b..2d96b88827 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -42,10 +42,6 @@ class ProfilerSimpleText extends ProfilerStandard { parent::__construct( $profileConfig ); } - protected function collateOnly() { - return true; - } - public function logData() { if ( $this->mTemplated ) { $this->close(); diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php index 2a4449483c..95e4bc6d29 100644 --- a/includes/profiler/ProfilerSimpleTrace.php +++ b/includes/profiler/ProfilerSimpleTrace.php @@ -30,10 +30,6 @@ class ProfilerSimpleTrace extends ProfilerStandard { protected $trace = "Beginning trace: \n"; protected $memory = 0; - protected function collateOnly() { - return true; - } - public function profileIn( $functionname ) { parent::profileIn( $functionname ); diff --git a/includes/profiler/ProfilerSimpleUDP.php b/includes/profiler/ProfilerSimpleUDP.php index 627b4de269..02405afc98 100644 --- a/includes/profiler/ProfilerSimpleUDP.php +++ b/includes/profiler/ProfilerSimpleUDP.php @@ -28,10 +28,6 @@ * @ingroup Profiler */ class ProfilerSimpleUDP extends ProfilerStandard { - protected function collateOnly() { - return true; - } - public function isPersistent() { return true; } diff --git a/includes/profiler/ProfilerStandard.php b/includes/profiler/ProfilerStandard.php index cc13416576..a65e53eb83 100644 --- a/includes/profiler/ProfilerStandard.php +++ b/includes/profiler/ProfilerStandard.php @@ -40,8 +40,8 @@ class ProfilerStandard extends Profiler { protected $mCollated = array(); /** @var bool */ protected $mCollateDone = false; - /** @var bool */ - protected $mCollateOnly = false; + /** @var bool Whether to collect the full stack trace or just aggregates */ + protected $mCollateOnly = true; /** @var array Cache of a standard broken collation entry */ protected $mErrorEntry; @@ -51,8 +51,6 @@ class ProfilerStandard extends Profiler { public function __construct( array $params ) { parent::__construct( $params ); - $this->mCollateOnly = $this->collateOnly(); - $this->addInitialStack(); } @@ -75,18 +73,6 @@ class ProfilerStandard extends Profiler { return false; } - /** - * Whether to internally just track aggregates and ignore the full stack trace - * - * Only doing collation saves memory overhead but limits the use of certain - * features like that of graph generation for the debug toolbar. - * - * @return bool - */ - protected function collateOnly() { - return false; - } - /** * Add the inital item in the stack. */