public function processLogs() { $requestId = $this->getRequestId(); $duration = Yii::app()->performance->endClockAndGet(); $formattedNumber = number_format($duration, 6); $this->writeLine($formattedNumber, $requestId); parent::processLogs(); }
public function processLogs() { $requestId = $this->getRequestId(); $data = RequestPerformanceTimer::getDataForCategory($this->category); $sum = 0.0; foreach ($data as $line) { if (!$this->collapsed) { $formattedNumber = number_format($line, 6); $this->writeLine($formattedNumber, $requestId); } else { $sum += $line; } } if ($this->collapsed) { $this->writeLine($sum, $requestId); } parent::processLogs(); }