Cache Image Counter & page gen time

This commit is contained in:
Bingus_Violet 2024-01-27 14:26:20 -06:00
parent 4463448217
commit d8e21e8b7b
2 changed files with 3 additions and 0 deletions

View file

@ -367,6 +367,7 @@ async function pageUpdate() {
html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000) + ' ago') html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000) + ' ago')
html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago') html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
html = html.replace("{QUOTE_COUNT}", randomQuotes.length) html = html.replace("{QUOTE_COUNT}", randomQuotes.length)
html = html.replace("{CACHED_IMAGES}", fs.readdirSync(path.join(staticpath, 'cached')).length)
html = html.replace("{GENERATION_TIME}", Math.ceil(Date.now() - genStart).toString() + 'ms') html = html.replace("{GENERATION_TIME}", Math.ceil(Date.now() - genStart).toString() + 'ms')

View file

@ -65,6 +65,8 @@
<li>Uptime: {UPTIME}</li> <li>Uptime: {UPTIME}</li>
<li>Last Lanyard Update: {LAST_LANYARD}</li> <li>Last Lanyard Update: {LAST_LANYARD}</li>
<li>Quotes: {QUOTE_COUNT}</li> <li>Quotes: {QUOTE_COUNT}</li>
<li>Images Cached: {CACHED_IMAGES}</li>
<li>Page Generation Time: {GENERATION_TIME}</li>
</ul> </ul>
{SOCIALS} {SOCIALS}