getClass() public method

Return the benchmark class.
public getClass ( ) : string
return string
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function benchmarkStart(BenchmarkMetadata $benchmark)
 {
     static $first = true;
     if (false === $first) {
         $this->output->write(PHP_EOL);
     }
     $first = false;
     $this->output->writeln(sprintf('<comment>%s</comment>', $benchmark->getClass()));
     $this->output->write(PHP_EOL);
 }
Beispiel #2
0
 public function benchmarkStart(BenchmarkMetadata $benchmark)
 {
     static $first = true;
     if ($this->showBench) {
         // do not output a line break on the first run
         if (false === $first) {
             $this->output->writeln('');
         }
         $first = false;
         $this->output->writeln($benchmark->getClass());
     }
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function benchmarkStart(BenchmarkMetadata $benchmark)
 {
     static $first = true;
     if (false === $first) {
         $this->output->write(PHP_EOL);
     }
     $first = false;
     $this->output->write(sprintf('<comment>%s</comment>', $benchmark->getClass()));
     $subjectNames = array();
     foreach ($benchmark->getSubjectMetadatas() as $subject) {
         $subjectNames[] = sprintf('#%s %s', $subject->getIndex(), $subject->getName());
     }
     $this->output->write(sprintf(' (%s)', implode(', ', $subjectNames)));
     $this->output->write(PHP_EOL);
     $this->output->write(PHP_EOL);
 }
Beispiel #4
0
 /**
  * {@inheritdoc}
  */
 public function benchmarkStart(BenchmarkMetadata $benchmark)
 {
     $this->output->writeln(sprintf('<comment>%s</comment>', $benchmark->getClass()));
     $this->output->write(PHP_EOL);
 }
Beispiel #5
0
 /**
  * {@inheritdoc}
  */
 public function executeMethods(BenchmarkMetadata $benchmark, array $methods)
 {
     $tokens = array('class' => $benchmark->getClass(), 'file' => $benchmark->getPath(), 'methods' => var_export($methods, true));
     $payload = $this->launcher->payload(__DIR__ . '/template/benchmark_static_methods.template', $tokens);
     $payload->launch();
 }