X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fprofiler%2FProfileSection.php;h=9062251021457e64b8baecf903409989a355dcef;hb=a2ea6116af243c8e7940e5eea8b353770502fe17;hp=ca80ebcb0b4960c7fb52d4dac6ab1d3f79f81158;hpb=7722d5e8876b4aae23cfebb0796c63e8f48df2b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfileSection.php b/includes/profiler/ProfileSection.php index ca80ebcb0b..9062251021 100644 --- a/includes/profiler/ProfileSection.php +++ b/includes/profiler/ProfileSection.php @@ -25,13 +25,9 @@ * Class for handling function-scope profiling * * @since 1.22 + * @deprecated 1.25 No-op now */ class ProfileSection { - /** @var string $name Method name */ - protected $name; - /** @var boolean $enabled Is profiling enabled? */ - protected $enabled = false; - /** * Begin profiling of a function and return an object that ends profiling * of the function when that object leaves scope. As long as the object is @@ -39,25 +35,9 @@ class ProfileSection { * the same moment that the function to be profiled terminates. * * This is typically called like: - * $section = new ProfileSection( __METHOD__ ); + * @code$section = new ProfileSection( __METHOD__ );@endcode * * @param string $name Name of the function to profile */ - public function __construct( $name ) { - $this->name = $name; - // Use Profiler member variable directly to reduce overhead - if ( Profiler::$__instance === null ) { - Profiler::instance(); - } - if ( !( Profiler::$__instance instanceof ProfilerStub ) ) { - $this->enabled = true; - Profiler::$__instance->profileIn( $this->name ); - } - } - - function __destruct() { - if ( $this->enabled ) { - Profiler::$__instance->profileOut( $this->name ); - } - } + public function __construct( $name ) {} }