Exemplo n.º 1
0
 /**
  * @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();
 }
Exemplo n.º 2
0
 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']++;
     }
 }
Exemplo n.º 3
0
 /**
  * @param array $params
  * @see Xhprof::__construct()
  */
 public function __construct(array $params = array())
 {
     parent::__construct($params);
     $this->xhprof = new Xhprof($params);
     $this->sprofiler = new SectionProfiler();
 }
Exemplo n.º 4
0
 /**
  * @param array $params
  */
 public function __construct(array $params)
 {
     parent::__construct($params);
     $this->mCollateOnly = $this->collateOnly();
     $this->addInitialStack();
 }
Exemplo n.º 5
0
 public function __construct(array $params = [])
 {
     parent::__construct($params);
     $this->sprofiler = new SectionProfiler();
 }