Skip to content

Commit 86ac72e

Browse files
Print statistics
1 parent 8536dc9 commit 86ac72e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,25 @@ public function execute(): Result
6363

6464
print 'Warming cache for static analysis ... ';
6565

66-
(new CacheWarmer)->warmCache(
66+
$statistics = (new CacheWarmer)->warmCache(
6767
$this->configuration->coverageCacheDirectory(),
6868
!$this->configuration->disableCodeCoverageIgnore(),
6969
$this->configuration->ignoreDeprecatedCodeUnitsFromCodeCoverage(),
7070
$this->codeCoverageFilterRegistry->get(),
7171
);
7272

7373
printf(
74-
'[%s]%s',
74+
'[%s]%s%s%d file%s processed, %d cache hit%s, %d cache miss%s%s',
7575
$timer->stop()->asString(),
7676
PHP_EOL,
77+
PHP_EOL,
78+
$statistics['cacheHits'] + $statistics['cacheMisses'],
79+
($statistics['cacheHits'] + $statistics['cacheMisses']) !== 1 ? 's' : '',
80+
$statistics['cacheHits'],
81+
$statistics['cacheHits'] !== 1 ? 's' : '',
82+
$statistics['cacheMisses'],
83+
$statistics['cacheMisses'] !== 1 ? 'es' : '',
84+
PHP_EOL,
7785
);
7886

7987
return Result::from();

0 commit comments

Comments
 (0)