mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-21 06:39:02 +08:00
Percentages for the cache ratio
This commit is contained in:
parent
b5bac6b2fe
commit
257c7a40ef
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ class Logger {
|
|||
$this->cache['hits'] = $cache_hits - $this->cache_hit_offset;
|
||||
$this->cache['misses'] = $cache_misses - $this->cache_miss_offset;
|
||||
if ( $cache_total ) {
|
||||
$this->cache['ratio'] = $cache_hits / $cache_total;
|
||||
$ratio = ( $cache_hits / $cache_total ) * 100;
|
||||
$this->cache['ratio'] = round( $ratio, 2 ) . '%';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue