From f85d1c71dc47f24fa3dfcd3a3c5a5063631c49b0 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 26 Aug 2016 09:04:20 -0700 Subject: [PATCH] Percentages for the cache ratio --- inc/class-logger.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/class-logger.php b/inc/class-logger.php index a8a2983..4e293db 100644 --- a/inc/class-logger.php +++ b/inc/class-logger.php @@ -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 ) . '%'; } }