PhpBench\Tests\Util\TestUtil::createResults PHP Method

createResults() public static method

public static createResults ( $time, $memory )
    public static function createResults($time, $memory = 0)
    {
        return [new TimeResult($time), new MemoryResult($memory, $memory, $memory), new RejectionCountResult(0)];
    }

Usage Example

示例#1
0
 /**
  * It should show statistics when an iteration is completed (and there
  * were no rejections).
  */
 public function testIterationEndStats()
 {
     foreach ($this->variant as $iteration) {
         foreach (TestUtil::createResults(10, 10) as $result) {
             $iteration->setResult($result);
         }
     }
     $this->variant->computeStats();
     $this->logger->variantEnd($this->variant);
     $this->assertContains('RSD/r: 0.00%', $this->output->fetch());
 }
All Usage Examples Of PhpBench\Tests\Util\TestUtil::createResults