Pregen time

This commit is contained in:
bingus_violet 2024-06-19 18:45:41 -05:00
parent d26b0e12ed
commit 8c2883ba5c
2 changed files with 3 additions and 1 deletions

View file

@ -389,8 +389,9 @@ function socketeer() {
lastLanyardUpdate = Date.now() lastLanyardUpdate = Date.now()
for (var i = 0; i < pregenFiles.length; i++) { for (var i = 0; i < pregenFiles.length; i++) {
// console.log(pregenFiles[i].absolutePath) var startTime = Date.now()
pregenFiles[i].html = converter(fs.readFileSync(pregenFiles[i].absolutePath).toString(), false) pregenFiles[i].html = converter(fs.readFileSync(pregenFiles[i].absolutePath).toString(), false)
pregenFiles[i].html = pregenFiles[i].html.replaceAll("{PREGEN_TIME}", Date.now() - startTime)
} }
for (var i = 0; i < lanyardData.activities.length; i++) { for (var i = 0; i < lanyardData.activities.length; i++) {

View file

@ -36,6 +36,7 @@
<br> <br>
<ul> <ul>
<li>Page generation time: {LOAD_TIME}</li> <li>Page generation time: {LOAD_TIME}</li>
<li>Pregeneration time: {PREGEN_TIME}ms</li>
<li>Uptime: {UPTIME}</li> <li>Uptime: {UPTIME}</li>
<li>Last Lanyard update: {LAST_LANYARD}</li> <li>Last Lanyard update: {LAST_LANYARD}</li>
</ul> </ul>