PhpBench\Benchmark\RunnerContext::getRevolutions PHP Method

getRevolutions() public method

Get the number of rev(olutions) to run.
public getRevolutions ( integer $default = null )
$default integer
    public function getRevolutions($default = null)
    {
        return $this->options['revolutions'] ?: $default;
    }

Usage Example

示例#1
0
 /**
  * Defaults should be ignored if explicit values are set in the context.
  */
 public function testOverride()
 {
     $context = new RunnerContext(__DIR__, array('iterations' => 20, 'revolutions' => 30, 'retry_threshold' => 40));
     $this->assertEquals(20, $context->getIterations(10));
     $this->assertEquals(30, $context->getRevolutions(10));
     $this->assertEquals(40, $context->getRetryThreshold(10));
 }
All Usage Examples Of PhpBench\Benchmark\RunnerContext::getRevolutions