/** * @param array $params * @see Xhprof::__construct() */ public function __construct(array $params = []) { parent::__construct($params); $flags = isset($params['flags']) ? $params['flags'] : 0; $options = isset($params['exclude']) ? ['ignored_functions' => $params['exclude']] : []; Xhprof::enable($flags, $options); $this->sprofiler = new SectionProfiler(); }
function __construct($params) { global $wgRequestTime, $wgRUstart; parent::__construct($params); $this->errorEntry = $this->zeroEntry; $this->errorEntry['count'] = 1; if (!empty($wgRequestTime) && !empty($wgRUstart)) { # Remove the -total entry from parent::__construct $this->mWorkStack = array(); $this->mWorkStack[] = array('-total', 0, $wgRequestTime, $this->getCpuTime($wgRUstart)); $elapsedcpu = $this->getCpuTime() - $this->getCpuTime($wgRUstart); $elapsedreal = microtime(true) - $wgRequestTime; $entry =& $this->mCollated["-setup"]; if (!is_array($entry)) { $entry = $this->zeroEntry; $this->mCollated["-setup"] =& $entry; } $entry['cpu'] += $elapsedcpu; $entry['cpu_sq'] += $elapsedcpu * $elapsedcpu; $entry['real'] += $elapsedreal; $entry['real_sq'] += $elapsedreal * $elapsedreal; $entry['count']++; } }
/** * @param array $params * @see Xhprof::__construct() */ public function __construct(array $params = array()) { parent::__construct($params); $this->xhprof = new Xhprof($params); $this->sprofiler = new SectionProfiler(); }
/** * @param array $params */ public function __construct(array $params) { parent::__construct($params); $this->mCollateOnly = $this->collateOnly(); $this->addInitialStack(); }
public function __construct(array $params = []) { parent::__construct($params); $this->sprofiler = new SectionProfiler(); }