show debug info

v1.18.x
barisusakli 9 years ago
parent d621b120b0
commit 1364fb94bf

@ -20,14 +20,14 @@ cacheController.get = function(req, res, next) {
itemCount: postCache.itemCount,
percentFull: percentFull,
avgPostSize: avgPostSize,
dump: req.query.debug ? postCache.dump() : undefined
dump: req.query.debug ? JSON.stringify(postCache.dump(), null, 4) : false
},
groupCache: {
length: groupCache.length,
max: groupCache.max,
itemCount: groupCache.itemCount,
percentFull: ((groupCache.length / groupCache.max) * 100).toFixed(2),
dump: req.query.debug ? groupCache.dump() : undefined
dump: req.query.debug ? JSON.stringify(groupCache.dump(), null, 4) : false
}
});
};

@ -20,6 +20,10 @@
</div>
</div>
<!-- IF postCache.dump -->
<pre>{postCache.dump}</pre>
<!-- ENDIF postCache.dump -->
</div>
</div>
@ -39,6 +43,10 @@
</div>
</div>
<!-- IF groupCache.dump -->
<pre>{groupCache.dump}</pre>
<!-- ENDIF groupCache.dump -->
</div>
</div>
</div>

Loading…
Cancel
Save