From 2bbad8f4b0dfc72c6cc73ef0a9f03f4e3a935eae Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Aug 2024 07:58:16 +0200 Subject: [PATCH] Feature/add logging to benchmark service (#3654) * Add logging --- apps/api/src/app/benchmark/benchmark.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts index b6fdc8ea9..710eb0212 100644 --- a/apps/api/src/app/benchmark/benchmark.service.ts +++ b/apps/api/src/app/benchmark/benchmark.service.ts @@ -105,6 +105,8 @@ export class BenchmarkService { const { benchmarks, expiration }: BenchmarkValue = JSON.parse(cachedBenchmarkValue); + Logger.debug('Fetched benchmarks from cache', 'BenchmarkService'); + if (isAfter(new Date(), new Date(expiration))) { this.calculateAndCacheBenchmarks({ enableSharing @@ -356,6 +358,8 @@ export class BenchmarkService { private async calculateAndCacheBenchmarks({ enableSharing = false }): Promise { + Logger.debug('Calculate benchmarks', 'BenchmarkService'); + const benchmarkAssetProfiles = await this.getBenchmarkAssetProfiles({ enableSharing });