Esempio n. 1
0
 public function testInclusiveTime()
 {
     $this->entry->setInclusiveTime(100500);
     $this->assertEquals(100500, $this->entry->getInclusiveTime());
 }
Esempio n. 2
0
 private function countExclusive(Entry $entry)
 {
     if ($entry->getExclusiveTime() === null) {
         $entry->setExclusiveTime($entry->getInclusiveTime());
         foreach ($entry->getCallees() as $callee) {
             $this->countExclusive($callee);
             $entry->setExclusiveTime($entry->getExclusiveTime() - $callee->getInclusiveTime() / $callee->getCalls());
         }
     }
     if ($entry->getExclusiveMemory() === null) {
         $entry->setExclusiveMemory($entry->getInclusiveMemory());
         foreach ($entry->getCallees() as $callee) {
             $this->countExclusive($callee);
             $entry->setExclusiveMemory($entry->getExclusiveMemory() - $callee->getInclusiveMemory() / $callee->getCalls());
         }
     }
 }