diff --git a/public/index.html b/public/index.html index 61920a01..b470ec86 100644 --- a/public/index.html +++ b/public/index.html @@ -87,6 +87,6 @@ - + diff --git a/public/perf.js b/public/perf.js index 3ba857c9..92f6f22a 100644 --- a/public/perf.js +++ b/public/perf.js @@ -28,6 +28,26 @@
${server.slowQueries.length}
Slow (>100ms)
`; + // Cache stats + if (server.cache) { + const c = server.cache; + const clientCache = _apiCache ? _apiCache.size : 0; + html += `

Cache

+
${c.size}
Server Entries
+
${c.hits}
Server Hits
+
${c.misses}
Server Misses
+
${c.hitRate}%
Server Hit Rate
+
${clientCache}
Client Entries
+
`; + if (client) { + html += `
+
${client.cacheHits || 0}
Client Hits
+
${client.cacheMisses || 0}
Client Misses
+
${client.cacheHitRate || 0}%
Client Hit Rate
+
`; + } + } + // Server endpoints table const eps = Object.entries(server.endpoints); if (eps.length) {