From cdd4e5949f50a4b0c66e71a793b77221dc3cfab9 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Fri, 3 Feb 2023 10:39:41 -0600 Subject: [PATCH] fix: correctly log SQL generation time --- src/repo/sqlite.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index 8f93de2..daefa46 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -364,9 +364,8 @@ impl NostrRepo for SqliteRepo { for filter in sub.filters.iter() { let filter_start = Instant::now(); filter_count += 1; - let (q, p, idx) = query_from_filter(&filter); let sql_gen_elapsed = start.elapsed(); - + let (q, p, idx) = query_from_filter(&filter); if sql_gen_elapsed > Duration::from_millis(10) { debug!("SQL (slow) generated in {:?}", filter_start.elapsed()); }