cleanup score component and add finish score stats
All checks were successful
Deploy SSR / deploy (push) Successful in 1m12s

This commit is contained in:
Lee
2024-09-12 16:33:07 +01:00
parent 1f4b1d10af
commit 9e3c670a9e
8 changed files with 301 additions and 138 deletions

View File

@ -25,7 +25,7 @@ class BeatSaverFetcher extends DataFetcher {
let map = await db.beatSaverMaps.get(query);
// The map is cached
if (map != undefined) {
this.log(`Found cached map "${query}" in ${(performance.now() - before).toFixed(2)}ms`);
this.log(`Found cached map "${query}" in ${(performance.now() - before).toFixed(0)}ms`);
return map;
}
@ -47,7 +47,7 @@ class BeatSaverFetcher extends DataFetcher {
fullData: response,
});
map = await db.beatSaverMaps.get(query);
this.log(`Found map "${query}" in ${(performance.now() - before).toFixed(2)}ms`);
this.log(`Found map "${query}" in ${(performance.now() - before).toFixed(0)}ms`);
return map;
}
}

View File

@ -35,7 +35,7 @@ class ScoreSaberFetcher extends DataFetcher {
return undefined;
}
results.players.sort((a, b) => a.rank - b.rank);
this.log(`Found ${results.players.length} players in ${(performance.now() - before).toFixed(2)}ms`);
this.log(`Found ${results.players.length} players in ${(performance.now() - before).toFixed(0)}ms`);
return results;
}
@ -53,7 +53,7 @@ class ScoreSaberFetcher extends DataFetcher {
if (response === undefined) {
return undefined;
}
this.log(`Found player "${playerId}" in ${(performance.now() - before).toFixed(2)}ms`);
this.log(`Found player "${playerId}" in ${(performance.now() - before).toFixed(0)}ms`);
return response;
}
@ -84,7 +84,7 @@ class ScoreSaberFetcher extends DataFetcher {
if (response === undefined) {
return undefined;
}
this.log(`Found scores for player "${playerId}" in ${(performance.now() - before).toFixed(2)}ms`);
this.log(`Found scores for player "${playerId}" in ${(performance.now() - before).toFixed(0)}ms`);
return response;
}
}