Percentages for the cache ratio

This commit is contained in:
Daniel Bachhuber 2016-08-26 09:04:20 -07:00
parent b5bac6b2fe
commit 257c7a40ef

View file

@ -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 ) . '%';
}
}