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