Scientist\Result::getMemory PHP Method

getMemory() public method

Get the memory spike amount of the callback.
public getMemory ( ) : float
return float
    public function getMemory()
    {
        return $this->endMemory - $this->startMemory;
    }

Usage Example

Ejemplo n.º 1
0
 public function test_result_can_have_total_memory_usage()
 {
     $r = new Result();
     $r->setStartMemory(2);
     $r->setEndMemory(5);
     $this->assertEquals(3, $r->getMemory());
 }