Add a time measurement of the criterion loop

This commit is contained in:
Clément Renault 2019-12-22 18:39:50 +01:00
parent 8c140f6bcd
commit ed6172aa94
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE

View File

@ -117,6 +117,7 @@ where
before_raw_documents_building.elapsed(), before_raw_documents_building.elapsed(),
); );
let before_criterion_loop = Instant::now();
let mut groups = vec![raw_documents.as_mut_slice()]; let mut groups = vec![raw_documents.as_mut_slice()];
'criteria: for criterion in criteria.as_ref() { '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 = 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())); let iter = iter.map(|rd| Document::from_raw(rd, &automatons, &arena, searchable_attrs.as_ref()));