show hit ratio instead

v1.18.x
Barış Soner Uşaklı 7 years ago
parent e453057acc
commit 926b763f74

@ -42,7 +42,7 @@ cacheController.get = function (req, res) {
dump: req.query.debug ? JSON.stringify(objectCache.dump(), null, 4) : false,
hits: utils.addCommas(String(objectCache.hits)),
misses: utils.addCommas(String(objectCache.misses)),
missRatio: (1 - (objectCache.hits / (objectCache.hits + objectCache.misses))).toFixed(4),
hitRatio: (objectCache.hits / (objectCache.hits + objectCache.misses)).toFixed(4),
};
}

@ -42,7 +42,7 @@
<label>Hits:</label> <span>{objectCache.hits}</span><br/>
<label>Misses:</label> <span>{objectCache.misses}</span><br/>
<label>Miss Ratio:</label> <span>{objectCache.missRatio}</span><br/>
<label>Hit Ratio:</label> <span>{objectCache.hitRatio}</span><br/>
<!-- IF objectCache.dump -->
<pre>{objectCache.dump}</pre>

Loading…
Cancel
Save