From 976dc1f4bc7f5008350e9a6b8155b27a3f39b12f Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 29 Jul 2021 14:30:33 +0200 Subject: [PATCH 1/2] prefix the search benchmarks with 'search' --- .github/workflows/benchmarks.yml | 4 ++-- benchmarks/Cargo.toml | 4 ++-- benchmarks/benches/{songs.rs => search_songs.rs} | 0 benchmarks/benches/{wiki.rs => search_wiki.rs} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename benchmarks/benches/{songs.rs => search_songs.rs} (100%) rename benchmarks/benches/{wiki.rs => search_wiki.rs} (100%) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 02f54fe13..c1475e281 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: dataset_name: - description: 'The name of the dataset used to benchmark (songs, wiki or indexing)' + description: 'The name of the dataset used to benchmark (search_songs, search_wiki or indexing)' required: false - default: 'songs' + default: 'search_songs' env: HOME: "/home/runner" # The actions-rs/toolchain@v1 can fail we have no $HOME defined diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index dd319b4e6..9e380b9a8 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -22,11 +22,11 @@ convert_case = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls"], default-features = false } [[bench]] -name = "songs" +name = "search_songs" harness = false [[bench]] -name = "wiki" +name = "search_wiki" harness = false [[bench]] diff --git a/benchmarks/benches/songs.rs b/benchmarks/benches/search_songs.rs similarity index 100% rename from benchmarks/benches/songs.rs rename to benchmarks/benches/search_songs.rs diff --git a/benchmarks/benches/wiki.rs b/benchmarks/benches/search_wiki.rs similarity index 100% rename from benchmarks/benches/wiki.rs rename to benchmarks/benches/search_wiki.rs From 7eb2d71009c79065843e46c4fc0b701cc52e04bc Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 29 Jul 2021 14:31:00 +0200 Subject: [PATCH 2/2] fix the benchmarks --- benchmarks/benches/utils.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmarks/benches/utils.rs b/benchmarks/benches/utils.rs index fd1df0a90..5318527f4 100644 --- a/benchmarks/benches/utils.rs +++ b/benchmarks/benches/utils.rs @@ -115,5 +115,7 @@ pub fn run_benches(c: &mut criterion::Criterion, confs: &[Conf]) { }); } group.finish(); + + index.prepare_for_closing().wait(); } }