* @ingroup Profiler
* @author Aaron Schulz
*/
+use Wikimedia\ScopedCallback;
/**
* Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle
protected $collateOnly = true;
/** @var array Cache of a standard broken collation entry */
protected $errorEntry;
- /** @var callable Cache of a profile out callback */
- protected $profileOutCallback;
/**
* @param array $params
public function __construct( array $params = [] ) {
$this->errorEntry = $this->getErrorEntry();
$this->collateOnly = empty( $params['trace'] );
- $this->profileOutCallback = function ( $profiler, $section ) {
- $profiler->profileOutInternal( $section );
- };
}
/**
* @param string $section
- * @return ScopedCallback
+ * @return SectionProfileCallback
*/
public function scopedProfileIn( $section ) {
$this->profileInInternal( $section );