private function processBenchmark(Benchmark $benchmark, \DOMElement $suiteEl) { $benchmarkEl = $suiteEl->appendElement('benchmark'); $benchmarkEl->setAttribute('class', $benchmark->getClass()); foreach ($benchmark->getSubjects() as $subject) { $this->processSubject($subject, $benchmarkEl); } }
/** * {@inheritdoc} */ public function benchmarkStart(Benchmark $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); }
public function benchmarkStart(Benchmark $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()); } }
/** * {@inheritdoc} */ public function benchmarkStart(Benchmark $benchmark) { static $first = true; if (false === $first) { $this->output->write(PHP_EOL); } $first = false; $this->output->write(sprintf('<comment>%s</comment>', $benchmark->getClass())); $subjectNames = []; foreach ($benchmark->getSubjects() as $index => $subject) { $subjectNames[] = sprintf('#%s %s', $index, $subject->getName()); } $this->output->write(sprintf(' (%s)', implode(', ', $subjectNames))); $this->output->write(PHP_EOL); $this->output->write(PHP_EOL); }
/** * {@inheritdoc} */ public function benchmarkStart(Benchmark $benchmark) { $this->output->writeln(sprintf('<comment>%s</comment>', $benchmark->getClass())); $this->output->write(PHP_EOL); }