From c3ba0bd8b6addfdc279ad56e8e0c7a9edade06cb Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Wed, 25 Dec 2024 08:39:51 +0000 Subject: [PATCH] agent: log all queries --- src/Simplex/Messaging/Agent/Store/SQLite/DB.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs b/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs index 4d9dbeb57..c696d84d5 100644 --- a/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs +++ b/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs @@ -56,7 +56,8 @@ timeIt slow sql a = do throwIO e t' <- getCurrentTime let diff = diffToMilliseconds $ diffUTCTime t' t - when (diff > 1) $ atomically $ TM.alter (updateQueryStats diff) sql slow + -- when (diff > 1) $ atomically $ TM.alter (updateQueryStats diff) sql slow + atomically $ TM.alter (updateQueryStats diff) sql slow pure r where updateQueryErrors :: SomeException -> Maybe SlowQueryStats -> SlowQueryStats