mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Update benchmarks
This commit is contained in:
parent
4dd3675d2b
commit
4dd7b20c32
@ -1,5 +1,5 @@
|
|||||||
use criterion::{criterion_group, criterion_main};
|
use criterion::{criterion_group, criterion_main};
|
||||||
use milli::tokenizer::{Analyzer, AnalyzerConfig};
|
use milli::tokenizer::Tokenize;
|
||||||
use milli::{FormatOptions, MatcherBuilder, MatchingWord, MatchingWords};
|
use milli::{FormatOptions, MatcherBuilder, MatchingWord, MatchingWords};
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
@ -52,9 +52,7 @@ fn bench_formatting(c: &mut criterion::Criterion) {
|
|||||||
for conf in confs {
|
for conf in confs {
|
||||||
group.bench_function(conf.name, |b| {
|
group.bench_function(conf.name, |b| {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let analyzer = Analyzer::new(AnalyzerConfig::<Vec<u8>>::default());
|
let tokens: Vec<_> = conf.text.tokenize().collect();
|
||||||
let analyzed = analyzer.analyze(&conf.text);
|
|
||||||
let tokens: Vec<_> = analyzed.tokens().collect();
|
|
||||||
let mut matcher = conf.matching_words.build(&tokens[..], conf.text);
|
let mut matcher = conf.matching_words.build(&tokens[..], conf.text);
|
||||||
matcher.format(option.clone());
|
matcher.format(option.clone());
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user