This commit is contained in:
mattyatea 2024-04-02 22:44:12 +09:00
parent b1c751fa3a
commit 103c4190eb
3 changed files with 4 additions and 3 deletions

View File

@ -28,6 +28,7 @@ export class AccountUpdateService {
@bindThis @bindThis
public async publishToFollowers(userId: MiUser['id']) { public async publishToFollowers(userId: MiUser['id']) {
console.time('AccountUpdateService.publishToFollowers');
const user = await this.usersRepository.findOneBy({ id: userId }); const user = await this.usersRepository.findOneBy({ id: userId });
if (user == null) throw new Error('user not found'); if (user == null) throw new Error('user not found');
@ -37,5 +38,6 @@ export class AccountUpdateService {
this.apDeliverManagerService.deliverToFollowers(user, content); this.apDeliverManagerService.deliverToFollowers(user, content);
this.relayService.deliverToRelays(user, content); this.relayService.deliverToRelays(user, content);
} }
console.timeEnd('AccountUpdateService.publishToFollowers');
} }
} }

View File

@ -344,7 +344,9 @@ export class GlobalEventService {
@bindThis @bindThis
public publishMainStream<K extends keyof MainEventTypes>(userId: MiUser['id'], type: K, value?: MainEventTypes[K]): void { public publishMainStream<K extends keyof MainEventTypes>(userId: MiUser['id'], type: K, value?: MainEventTypes[K]): void {
console.time('GlobalEventService.publishMainStream');
this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value); this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value);
console.time('GlobalEventService.publishMainStream');
} }
@bindThis @bindThis

View File

@ -289,7 +289,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
} }
console.time('update');
if (ps.mutedWords !== undefined) { if (ps.mutedWords !== undefined) {
checkMuteWordCount(ps.mutedWords, (await this.roleService.getUserPolicies(user.id)).wordMuteLimit); checkMuteWordCount(ps.mutedWords, (await this.roleService.getUserPolicies(user.id)).wordMuteLimit);
validateMuteWordRegex(ps.mutedWords); validateMuteWordRegex(ps.mutedWords);
@ -496,8 +495,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
for (const url of urls) { for (const url of urls) {
this.verifyLink(url.value, user); this.verifyLink(url.value, user);
} }
console.log('updateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdate');
console.timeEnd('update');
return iObj; return iObj;
}); });
} }