| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function reportStats( ImportStats $stats ) { |
||
| 22 | $this->output->writeln( "\n" ); |
||
| 23 | |||
| 24 | $this->output->writeln( '<info>Import stats:</info>' ); |
||
| 25 | |||
| 26 | $this->output->writeln( |
||
| 27 | sprintf( |
||
| 28 | '<comment>Entities: %d (%d succeeded, %d (%g%%) failed)</comment>', |
||
| 29 | $stats->getEntityCount(), |
||
| 30 | $stats->getSuccessCount(), |
||
| 31 | $stats->getErrorCount(), |
||
| 32 | $stats->getErrorRatio() |
||
| 33 | ) |
||
| 34 | ); |
||
| 35 | |||
| 36 | $this->output->writeln( |
||
| 37 | sprintf( |
||
| 38 | '<comment>Duration: %g seconds (%d entities/second)</comment>', |
||
| 39 | $stats->getDurationInMs(), |
||
| 40 | $stats->getEntityCount() / $stats->getDurationInMs() |
||
| 41 | ) |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | |||
| 46 |