aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/database.ts2
-rw-r--r--src/hypixelCached.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/database.ts b/src/database.ts
index 35c04e8..42fb569 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -47,7 +47,7 @@ interface ProfileLeaderboardItem {
value: number
}
-const cachedRawLeaderboards: Map<string, (DatabaseMemberLeaderboardItem|DatabaseProfileLeaderboardItem)[]> = new Map()
+export const cachedRawLeaderboards: Map<string, (DatabaseMemberLeaderboardItem|DatabaseProfileLeaderboardItem)[]> = new Map()
const leaderboardMax = 100
const reversedLeaderboards = [
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index 1f6b7f2..47cf088 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -9,6 +9,7 @@ import { CleanPlayer } from './cleaners/player'
import { isUuid, undashUuid } from './util'
import { CleanProfile, CleanFullProfile, CleanBasicProfile } from './cleaners/skyblock/profile'
import { debug } from '.'
+import { cachedRawLeaderboards } from './database'
// cache usernames for 4 hours
/** uuid: username */
@@ -378,6 +379,7 @@ setInterval(() => {
console.log('basicPlayerCache', basicPlayerCache.getStats())
console.log('usernameCache', usernameCache.getStats())
console.log('profileCache', profileCache.getStats())
+ console.log('cachedRawLeaderboards size', cachedRawLeaderboards.size)
console.log(
Math.floor((process.memoryUsage().heapUsed / 1024 / 1024) * 10) / 10
+ 'mb')