From 0bbecc50923899422d16321eb589e385e35c3d05 Mon Sep 17 00:00:00 2001 From: Bulat-Ziganshin Date: Thu, 8 Sep 2022 12:26:24 +0300 Subject: [PATCH] Report only every 1024'th getBlock --- codex/stores/sqlitestore.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codex/stores/sqlitestore.nim b/codex/stores/sqlitestore.nim index 393fe20f..815f3a16 100644 --- a/codex/stores/sqlitestore.nim +++ b/codex/stores/sqlitestore.nim @@ -75,7 +75,10 @@ method getBlock*( ## Save a copy to the cache if present in the database but not in the cache ## - notice " == getBlock" + var counter {.global.} = 0 + inc(counter) + if counter mod 1024 == 0: + echo counter if not self.cache.isNil: trace "Getting block from cache or database", cid