diff --git a/src/Command/InceptionResult.php b/src/Command/InceptionResult.php index 6abde5aefb..14a1d5202d 100644 --- a/src/Command/InceptionResult.php +++ b/src/Command/InceptionResult.php @@ -90,17 +90,17 @@ public function getGenerateBaselineFile(): ?string public function handleReturn(int $exitCode, ?int $peakMemoryUsageBytes, float $analysisStartTime): int { - if ($peakMemoryUsageBytes !== null && $this->getErrorOutput()->isVerbose()) { + if ($this->getErrorOutput()->isVerbose()) { $this->getErrorOutput()->writeLineFormatted(sprintf( - 'Used memory: %s', - BytesHelper::bytes(max(memory_get_peak_usage(true), $peakMemoryUsageBytes)), + 'Elapsed time: %s', + $this->formatDuration((int) round(microtime(true) - $analysisStartTime)), )); } - if ($this->getErrorOutput()->isDebug()) { + if ($peakMemoryUsageBytes !== null && $this->getErrorOutput()->isVerbose()) { $this->getErrorOutput()->writeLineFormatted(sprintf( - 'Analysis time: %s', - $this->formatDuration((int) round(microtime(true) - $analysisStartTime)), + 'Used memory: %s', + BytesHelper::bytes(max(memory_get_peak_usage(true), $peakMemoryUsageBytes)), )); }