/** * @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; }