/** * @param null $name * * @return $this */ public function record($name = null) { $snapshot = Snapshot::create(); $record = new Profiler\Record($this, $name, $snapshot, $this->_lastRecord); $this->_records[] = $record; $this->_lastRecord = $record; if (!$this->_startRecord) { $this->_startRecord = $record; } return $this; }
/** * @return Snapshot */ public function getAbsoluteResult() { return $this->_snapshot->diff($this->_profiler->getStartRecord()->getSnapshot()); }