mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-14 06:59:07 -05:00
fix: correctly log SQL generation time
This commit is contained in:
parent
5999009779
commit
cdd4e5949f
|
@ -364,9 +364,8 @@ impl NostrRepo for SqliteRepo {
|
||||||
for filter in sub.filters.iter() {
|
for filter in sub.filters.iter() {
|
||||||
let filter_start = Instant::now();
|
let filter_start = Instant::now();
|
||||||
filter_count += 1;
|
filter_count += 1;
|
||||||
let (q, p, idx) = query_from_filter(&filter);
|
|
||||||
let sql_gen_elapsed = start.elapsed();
|
let sql_gen_elapsed = start.elapsed();
|
||||||
|
let (q, p, idx) = query_from_filter(&filter);
|
||||||
if sql_gen_elapsed > Duration::from_millis(10) {
|
if sql_gen_elapsed > Duration::from_millis(10) {
|
||||||
debug!("SQL (slow) generated in {:?}", filter_start.elapsed());
|
debug!("SQL (slow) generated in {:?}", filter_start.elapsed());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user