/** * {@inheritdoc} */ public function iterationsEnd(IterationCollection $iterations) { if ($iterations->hasException()) { $this->output->write(sprintf("[0G %-30s<error>ERROR</error>", $iterations->getSubject()->getName())); $this->output->write(PHP_EOL); return; } $this->output->write(sprintf("\t%s", $this->formatIterationsFullSummary($iterations))); $this->output->write(PHP_EOL); }
/** * {@inheritdoc} */ public function iterationsEnd(IterationCollection $iterations) { if ($iterations->getRejectCount() > 0) { return; } $subject = $iterations->getSubject(); if ($iterations->hasException()) { $this->output->writeln(sprintf(' t%-30s <error>ERROR</error>', $subject->getName())); return; } $this->output->writeln(sprintf(" %-30s I%s P%s\t%s", $subject->getName(), $iterations->count(), $iterations->getParameterSet()->getIndex(), $this->formatIterationsFullSummary($iterations))); }
/** * {@inheritdoc} */ public function iterationsEnd(IterationCollection $iterations) { if ($iterations->hasException()) { $this->output->write(sprintf("[0G %-30s<error>ERROR</error>", $iterations->getSubject()->getName())); $this->output->write(PHP_EOL); return; } $stats = $iterations->getStats(); $timeUnit = $iterations->getSubject()->getOutputTimeUnit(); $mode = $iterations->getSubject()->getOutputMode(); $this->output->write(sprintf("\tμ/r: %s\tμSD/r %s\tμRSD/r: %s%%", $this->timeUnit->format($stats['mean'], $this->timeUnit->resolveDestUnit($timeUnit), $this->timeUnit->resolveMode($mode)), $this->timeUnit->format($stats['stdev'], $this->timeUnit->resolveDestUnit($timeUnit), TimeUnit::MODE_TIME), number_format($stats['rstdev'], 2))); $this->output->write(PHP_EOL); }
public function iterationsEnd(IterationCollection $iterations) { // do not show reject runs if ($iterations->getRejectCount() > 0) { return; } $dot = $iterations->hasException() ? '<error>E</error>' : '.'; if ($this->isCi) { $this->output->write($dot); return; } $this->buffer .= $dot; $this->output->write(sprintf("\r%s ", $this->buffer)); }
/** * {@inheritdoc} */ public function iterationsEnd(IterationCollection $iterations) { if ($iterations->getRejectCount() > 0) { return; } $subject = $iterations->getSubject(); if ($iterations->hasException()) { $this->output->writeln(sprintf("\t%-30s <error>ERROR</error>", $subject->getName())); return; } $stats = $iterations->getStats(); $timeUnit = $subject->getOutputTimeUnit(); $outputMode = $subject->getOutputMode(); $this->output->writeln(sprintf("\t%-30s I%s P%s\tμ/r: %s\tμSD/r %s\tμRSD/r: %s%%", $subject->getName(), $iterations->count(), $iterations->getParameterSet()->getIndex(), $this->timeUnit->format($stats['mean'], $timeUnit, $outputMode), $this->timeUnit->format($stats['stdev'], $timeUnit, TimeUnit::MODE_TIME), number_format($stats['rstdev'], 2))); }
/** * It should be aware of exceptions. */ public function testExceptionAwareness() { $iterations = new IterationCollection($this->subject->reveal(), $this->parameterSet->reveal(), 4, 1, 0); $exception = new \Exception('Test'); $this->assertFalse($iterations->hasException()); $iterations->setException($exception); $this->assertTrue($iterations->hasException()); $this->assertSame($exception, $iterations->getException()); }