Set the callback execution starting memory usage.
public setStartMemory ( float $startMemory ) | ||
$startMemory | float |
public function test_result_can_have_total_memory_usage() { $r = new Result(); $r->setStartMemory(2); $r->setEndMemory(5); $this->assertEquals(3, $r->getMemory()); }
/** * Set values before callback is executed. * * @return void */ protected function setStartValues() { $this->result->setStartTime(microtime(true)); $this->result->setStartMemory(memory_get_usage()); }