Example #1
0
 /**
  * @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;
 }
Example #2
0
 /**
  * @return Snapshot
  */
 public function getAbsoluteResult()
 {
     return $this->_snapshot->diff($this->_profiler->getStartRecord()->getSnapshot());
 }