PhpBench\Benchmark\RunnerContext::getRetryThreshold PHP Method

getRetryThreshold() public method

A value of NULL will disable retry.
public getRetryThreshold ( $default = null ) : float
return float
    public function getRetryThreshold($default = null)
    {
        return $this->options['retry_threshold'] ?: $default;
    }

Usage Example

 /**
  * 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::getRetryThreshold