mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 16:21:07 +00:00
Add a logging_timer macro to te criterion next methods
This commit is contained in:
committed by
Kerollmops
parent
82a0f678fb
commit
b18ec00a7a
@ -45,6 +45,7 @@ itertools = "0.10.0"
|
||||
|
||||
# logging
|
||||
log = "0.4.14"
|
||||
logging_timer = "1.0.0"
|
||||
|
||||
# We temporarily depend on this crate just to fix this issue
|
||||
# https://github.com/bheisler/TinyTemplate/pull/17
|
||||
|
@ -146,6 +146,7 @@ impl<'t> AscDesc<'t> {
|
||||
}
|
||||
|
||||
impl<'t> Criterion for AscDesc<'t> {
|
||||
#[logging_timer::time("AscDesc::{}")]
|
||||
fn next(&mut self, wdcache: &mut WordDerivationsCache) -> anyhow::Result<Option<CriterionResult>> {
|
||||
loop {
|
||||
debug!("Facet {}({}) iteration",
|
||||
|
@ -48,6 +48,7 @@ impl<'t> Fetcher<'t> {
|
||||
}
|
||||
|
||||
impl<'t> Criterion for Fetcher<'t> {
|
||||
#[logging_timer::time("Fetcher::{}")]
|
||||
fn next(&mut self, wdcache: &mut WordDerivationsCache) -> anyhow::Result<Option<CriterionResult>> {
|
||||
use Candidates::{Allowed, Forbidden};
|
||||
loop {
|
||||
|
@ -56,6 +56,7 @@ impl<'t> Proximity<'t> {
|
||||
}
|
||||
|
||||
impl<'t> Criterion for Proximity<'t> {
|
||||
#[logging_timer::time("Proximity::{}")]
|
||||
fn next(&mut self, wdcache: &mut WordDerivationsCache) -> anyhow::Result<Option<CriterionResult>> {
|
||||
use Candidates::{Allowed, Forbidden};
|
||||
loop {
|
||||
|
@ -53,6 +53,7 @@ impl<'t> Typo<'t> {
|
||||
}
|
||||
|
||||
impl<'t> Criterion for Typo<'t> {
|
||||
#[logging_timer::time("Typo::{}")]
|
||||
fn next(&mut self, wdcache: &mut WordDerivationsCache) -> anyhow::Result<Option<CriterionResult>> {
|
||||
use Candidates::{Allowed, Forbidden};
|
||||
loop {
|
||||
|
@ -47,6 +47,7 @@ impl<'t> Words<'t> {
|
||||
}
|
||||
|
||||
impl<'t> Criterion for Words<'t> {
|
||||
#[logging_timer::time("Words::{}")]
|
||||
fn next(&mut self, wdcache: &mut WordDerivationsCache) -> anyhow::Result<Option<CriterionResult>> {
|
||||
use Candidates::{Allowed, Forbidden};
|
||||
loop {
|
||||
|
Reference in New Issue
Block a user