/** * Executes stop or start methods on $_stat object * * @param string $action * @param string $timerId * @param int $time * @param int $realMemory * @param int $emallocMemory */ protected function _executeTimerAction($action, $timerId, $time = 0, $realMemory = 0, $emallocMemory = 0) { switch ($action) { case 'start': $this->_stat->start($timerId, $time, $realMemory, $emallocMemory); break; case 'stop': $this->_stat->stop($timerId, $time, $realMemory, $emallocMemory); break; default: $this->fail("Unexpected action '{$action}'"); break; } }
/** * Stop recording statistics for specified timer. * * @param string $timerId * @return void */ public function stop($timerId) { $this->_stat->stop($timerId, microtime(true), memory_get_usage(true), memory_get_usage()); }