mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Reduce the length of the benchmarks names
This commit is contained in:
parent
76a2343639
commit
29824d05ab
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -900,7 +900,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "helpers"
|
name = "helpers"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
@ -954,7 +954,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http-ui"
|
name = "http-ui"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"askama",
|
"askama",
|
||||||
@ -1095,7 +1095,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "infos"
|
name = "infos"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
@ -1358,7 +1358,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "milli"
|
name = "milli"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"big_s",
|
"big_s",
|
||||||
@ -2215,7 +2215,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "search"
|
name = "search"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
|
@ -10,7 +10,7 @@ milli = { path = "../milli" }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
heed = "*" # we want to use the version milli uses
|
heed = "*" # we want to use the version milli uses
|
||||||
criterion = "0.3.4"
|
criterion = { version = "0.3.4", features = ["html_reports"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use std::fs::{create_dir_all, remove_dir_all, File};
|
use std::fs::{create_dir_all, remove_dir_all, File};
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
use criterion::BenchmarkId;
|
use criterion::BenchmarkId;
|
||||||
use heed::EnvOpenOptions;
|
use heed::EnvOpenOptions;
|
||||||
@ -97,7 +98,9 @@ pub fn run_benches(c: &mut criterion::Criterion, confs: &[Conf]) {
|
|||||||
for conf in confs {
|
for conf in confs {
|
||||||
let index = base_setup(conf);
|
let index = base_setup(conf);
|
||||||
|
|
||||||
let mut group = c.benchmark_group(&format!("{}: {}", conf.dataset, conf.group_name));
|
let file_name = Path::new(conf.dataset).file_name().and_then(|f| f.to_str()).unwrap();
|
||||||
|
let name = format!("{}: {}", file_name, conf.group_name);
|
||||||
|
let mut group = c.benchmark_group(&name);
|
||||||
|
|
||||||
for &query in conf.queries {
|
for &query in conf.queries {
|
||||||
group.bench_with_input(BenchmarkId::from_parameter(query), &query, |b, &query| {
|
group.bench_with_input(BenchmarkId::from_parameter(query), &query, |b, &query| {
|
||||||
@ -106,8 +109,7 @@ pub fn run_benches(c: &mut criterion::Criterion, confs: &[Conf]) {
|
|||||||
let mut search = index.search(&rtxn);
|
let mut search = index.search(&rtxn);
|
||||||
search.query(query).optional_words(conf.optional_words);
|
search.query(query).optional_words(conf.optional_words);
|
||||||
if let Some(filter) = conf.filter {
|
if let Some(filter) = conf.filter {
|
||||||
let filter =
|
let filter = FilterCondition::from_str(&rtxn, &index, filter).unwrap();
|
||||||
FilterCondition::from_str(&rtxn, &index, filter).unwrap();
|
|
||||||
search.filter(filter);
|
search.filter(filter);
|
||||||
}
|
}
|
||||||
let _ids = search.execute().unwrap();
|
let _ids = search.execute().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user