chore(services): add debug logging to getUidScore function
Add console.debug logs at the beginning and end of the getUidScore function in uidScoreStore to track execution flow and performance. This aids in debugging when the function is called with large lists of uids. - Log start entry with uid count - Log end entry with uid count
This commit is contained in:
parent
30339596d7
commit
16b2899946
@ -2,9 +2,11 @@ import { xcxApi } from '../utils/server';
|
|||||||
|
|
||||||
export const getUidScore = async (uids: string[], force?: boolean): Promise<Record<string, string>> => {
|
export const getUidScore = async (uids: string[], force?: boolean): Promise<Record<string, string>> => {
|
||||||
const entries: [string, string][] = [];
|
const entries: [string, string][] = [];
|
||||||
|
console.debug('getUidScore(%s): start', uids.length);
|
||||||
for (const uid of uids) {
|
for (const uid of uids) {
|
||||||
const profile = await xcxApi.getAdvProfile(uid, force);
|
const profile = await xcxApi.getAdvProfile(uid, force);
|
||||||
entries.push([uid, profile?.score ?? '']);
|
entries.push([uid, profile?.score ?? '']);
|
||||||
}
|
}
|
||||||
|
console.debug('getUidScore(%s): end', uids.length);
|
||||||
return Object.fromEntries(entries);
|
return Object.fromEntries(entries);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user