From 57b2b43b74f32048117ba04005f44375bf28199d Mon Sep 17 00:00:00 2001 From: sliterok <12751644+sliterok@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:06:59 +0100 Subject: [PATCH] uncomment query stats --- src/db/index.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/db/index.ts b/src/db/index.ts index 430bb10..bcb1aa0 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -155,7 +155,7 @@ export class OPFSDB { }, options?: IQueryOptions ): Promise { - // const start = performance.now() + const start = performance.now() let indexes = new Set() for (const key in queries) { const tree = this.trees[key] @@ -175,12 +175,13 @@ export class OPFSDB { } } const indexArray = Array.from(indexes) - // const indexesFinish = performance.now() + const indexesFinish = performance.now() if (options?.keys) return indexArray const records = await this.readMany(indexArray) - // const responsesLoaded = performance.now() - // console.log('indexes:', indexesFinish - start, 'records:', responsesLoaded - indexesFinish) + const responsesLoaded = performance.now() + // eslint-disable-next-line no-console + console.log('indexes:', indexesFinish - start, 'records:', responsesLoaded - indexesFinish) return records }