The executor bundles both the methods for executing before and after and the benchmark iteration executor. The standard use case for an Executor is to execute or obtain the iteration measurements in a different way (e.g. xdebug, blackfire), the executeMethods logic has nothing to do with this and so this awkward base class is required. To be refactored...
Inheritance: implements PhpBench\Benchmark\ExecutorInterface
Esempio n. 1
0
 /**
  * @param Launcher $launcher
  * @param string $configPath
  * @param string $bootstrap
  */
 public function __construct(Launcher $launcher, TraceToXmlConverter $converter = null, Filesystem $filesystem = null)
 {
     parent::__construct($launcher);
     $this->filesystem = $filesystem ? $filesystem : new Filesystem();
     $this->converter = $converter ?: new TraceToXmlConverter();
 }
Esempio n. 2
0
 /**
  * @param Launcher $launcher
  * @param string $configPath
  * @param string $bootstrap
  */
 public function __construct(Launcher $launcher, Filesystem $filesystem)
 {
     parent::__construct($launcher);
     $this->converter = new TraceToXmlConverter();
     $this->filesystem = $filesystem;
 }