From f6498ebbea8ce33c76776ae340ec4ef983cb6f07 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Tue, 2 Apr 2024 22:51:43 +0900 Subject: [PATCH] are --- packages/backend/src/core/GlobalEventService.ts | 2 ++ packages/backend/src/misc/cache.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/backend/src/core/GlobalEventService.ts b/packages/backend/src/core/GlobalEventService.ts index f5a7b6e94d..0f2e20fecc 100644 --- a/packages/backend/src/core/GlobalEventService.ts +++ b/packages/backend/src/core/GlobalEventService.ts @@ -334,7 +334,9 @@ export class GlobalEventService { @bindThis public publishInternalEvent(type: K, value?: InternalEventTypes[K]): void { + console.time('time GlobalEventService.publishInternalEvent'); this.publish('internal', type, typeof value === 'undefined' ? null : value); + console.timeEnd('time GlobalEventService.publishInternalEvent'); } @bindThis diff --git a/packages/backend/src/misc/cache.ts b/packages/backend/src/misc/cache.ts index bba64a06ef..d4154ca16a 100644 --- a/packages/backend/src/misc/cache.ts +++ b/packages/backend/src/misc/cache.ts @@ -33,6 +33,7 @@ export class RedisKVCache { @bindThis public async set(key: string, value: T): Promise { + console.time('time RedisKVCache.set'); this.memoryCache.set(key, value); if (this.lifetime === Infinity) { await this.redisClient.set( @@ -46,6 +47,7 @@ export class RedisKVCache { 'EX', Math.round(this.lifetime / 1000), ); } + console.timeEnd('time RedisKVCache.set'); } @bindThis