From 103c4190ebe372ee745417720426fc2679325a8a Mon Sep 17 00:00:00 2001 From: mattyatea Date: Tue, 2 Apr 2024 22:44:12 +0900 Subject: [PATCH] are --- packages/backend/src/core/AccountUpdateService.ts | 2 ++ packages/backend/src/core/GlobalEventService.ts | 2 ++ packages/backend/src/server/api/endpoints/i/update.ts | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/AccountUpdateService.ts b/packages/backend/src/core/AccountUpdateService.ts index 69a57b4854..a6a411873d 100644 --- a/packages/backend/src/core/AccountUpdateService.ts +++ b/packages/backend/src/core/AccountUpdateService.ts @@ -28,6 +28,7 @@ export class AccountUpdateService { @bindThis public async publishToFollowers(userId: MiUser['id']) { + console.time('AccountUpdateService.publishToFollowers'); const user = await this.usersRepository.findOneBy({ id: userId }); if (user == null) throw new Error('user not found'); @@ -37,5 +38,6 @@ export class AccountUpdateService { this.apDeliverManagerService.deliverToFollowers(user, content); this.relayService.deliverToRelays(user, content); } + console.timeEnd('AccountUpdateService.publishToFollowers'); } } diff --git a/packages/backend/src/core/GlobalEventService.ts b/packages/backend/src/core/GlobalEventService.ts index bfd0cc8a4f..ebbefedf94 100644 --- a/packages/backend/src/core/GlobalEventService.ts +++ b/packages/backend/src/core/GlobalEventService.ts @@ -344,7 +344,9 @@ export class GlobalEventService { @bindThis public publishMainStream(userId: MiUser['id'], type: K, value?: MainEventTypes[K]): void { + console.time('GlobalEventService.publishMainStream'); this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value); + console.time('GlobalEventService.publishMainStream'); } @bindThis diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 924ffb16f7..022e9645da 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -289,7 +289,6 @@ export default class extends Endpoint { // eslint- } } - console.time('update'); if (ps.mutedWords !== undefined) { checkMuteWordCount(ps.mutedWords, (await this.roleService.getUserPolicies(user.id)).wordMuteLimit); validateMuteWordRegex(ps.mutedWords); @@ -496,8 +495,6 @@ export default class extends Endpoint { // eslint- for (const url of urls) { this.verifyLink(url.value, user); } - console.log('updateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdateupdate'); - console.timeEnd('update'); return iObj; }); }