Skip to content

Commit

Permalink
small refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Feb 21, 2024
1 parent ccac66b commit 050cd1f
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 276 deletions.
435 changes: 175 additions & 260 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.75"
thiserror = "1.0.50"
clap = { version = "4.4.11", features = ["derive"] }
ctrlc = "3.4.1"
futures = "0.3.29"
async-trait = "0.1.74"
anyhow = "1.0.80"
thiserror = "1.0.57"
clap = { version = "4.5.1", features = ["derive"] }
ctrlc = "3.4.2"
futures = "0.3.30"
async-trait = "0.1.77"
qdrant-client = "1.7.0"
rand = "0.8.5"
tokio = { version = "1.34.0", features = ["full"] }
tokio = { version = "1.36.0", features = ["full"] }
log = "0.4.20"
env_logger = "0.10.1"
env_logger = "0.11.2"
hdrhistogram = "7.5.4"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Leveraging the pre-built Docker images with
# cargo-chef and the Rust toolchain
# https://www.lpalmieri.com/posts/fast-rust-docker-builds/
FROM --platform=${BUILDPLATFORM:-linux/amd64} lukemathwalker/cargo-chef:latest-rust-1.74.0 AS chef
FROM --platform=${BUILDPLATFORM:-linux/amd64} lukemathwalker/cargo-chef:latest-rust-1.76.0 AS chef
WORKDIR /coach

FROM chef AS planner
Expand Down
2 changes: 1 addition & 1 deletion src/drills/collection_snapshots_churn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Drill for CollectionSnapshotsChurn {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create and populate collection if it does not exists
// create and populate collection if it does not exist
if !client.has_collection(&self.collection_name).await? {
// create collection
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/drills/high_concurrency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl HighConcurrency {
Ok(())
}

fn pick_random<'a>(&self, clients: &'a Vec<QdrantClient>) -> &'a QdrantClient {
fn pick_random<'a>(&self, clients: &'a [QdrantClient]) -> &'a QdrantClient {
let index = rand::random::<usize>() % clients.len();
&clients[index]
}
Expand Down
2 changes: 1 addition & 1 deletion src/drills/large_retrieve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Drill for LargeRetrieve {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create and populate collection if it does not exists
// create and populate collection if it does not exist
if !client.has_collection(&self.collection_name).await? {
log::info!("The large retrieve drill needs to setup the collection first");
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/drills/points_churn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl Drill for PointsChurn {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create and populate collection if it does not exists
// create and populate collection if it does not exist
if !client.has_collection(&self.collection_name).await? {
log::info!("The points churn drill needs to setup the collection first");
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/drills/points_optional_vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Drill for PointsOptionalVectors {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create and populate collection if it does not exists
// create and populate collection if it does not exist
if !client.has_collection(&self.collection_name).await? {
log::info!("The points optional vectors drill needs to setup the collection first");
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/drills/points_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Drill for PointsSearch {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create and populate collection if it does not exists
// create and populate collection if it does not exist
if !client.has_collection(&self.collection_name).await? {
log::info!("The search drill needs to setup the collection first");
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/drills/points_upsert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Drill for PointsUpdate {
}

async fn run(&self, client: &QdrantClient, args: Arc<Args>) -> Result<(), CoachError> {
// create if does not exists
// create if it does not exist
if !client.has_collection(&self.collection_name).await? {
log::info!("The update drill needs to setup the collection first");
create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?;
Expand Down

0 comments on commit 050cd1f

Please sign in to comment.