From fc3f859602d40c36cda3064cdf9ccbd80a5e1ee1 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 21 Feb 2024 22:16:29 +0300 Subject: [PATCH] profiling-less --- services/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/db.py b/services/db.py index 4fc5c09f..14884505 100644 --- a/services/db.py +++ b/services/db.py @@ -33,7 +33,7 @@ def after_cursor_execute(conn, cursor, statement, parameters, context, executema if hasattr(conn, '_query_start_time'): elapsed = time.time() - conn._query_start_time del conn._query_start_time - if elapsed > 0.2: # Adjust threshold as needed + if elapsed > 0.9: # Adjust threshold as needed logger.debug( f"\n{statement}\n{'*' * math.floor(elapsed)} {elapsed:.3f} s" )