From ed6172aa944832f246c47883b554ed8024d16a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 22 Dec 2019 18:39:50 +0100 Subject: [PATCH] Add a time measurement of the criterion loop --- meilisearch-core/src/bucket_sort.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meilisearch-core/src/bucket_sort.rs b/meilisearch-core/src/bucket_sort.rs index bfb8910fa..b9175851d 100644 --- a/meilisearch-core/src/bucket_sort.rs +++ b/meilisearch-core/src/bucket_sort.rs @@ -117,6 +117,7 @@ where before_raw_documents_building.elapsed(), ); + let before_criterion_loop = Instant::now(); let mut groups = vec![raw_documents.as_mut_slice()]; 'criteria: for criterion in criteria.as_ref() { @@ -162,6 +163,8 @@ where } } + debug!("criterion loop took {:.02?}", before_criterion_loop.elapsed()); + let iter = raw_documents.into_iter().skip(range.start).take(range.len()); let iter = iter.map(|rd| Document::from_raw(rd, &automatons, &arena, searchable_attrs.as_ref()));