Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
/data/
.TODO
/databases
/crates/benchmark/Datasets
.env
178 changes: 178 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/http",
"crates/tui",
"crates/grpc",
"crates/benchmark",
]

[workspace.package]
Expand All @@ -20,6 +21,7 @@ axum = "0.8"
axum-test = "18.1.0"
bincode = "1.3.3"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.5.54", features = ["derive"] }
color-eyre = "0.6.5"
crossterm = "0.27"
dotenv = "0.15.0"
Expand Down Expand Up @@ -53,3 +55,4 @@ index = { path = "crates/index" }
server = { path = "crates/server" }
storage = { path = "crates/storage" }
tui = { path = "crates/tui" }
#benchmark = { path = "crates/benchmark"}
1 change: 1 addition & 0 deletions crates/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition.workspace = true
license.workspace = true

[dependencies]
clap.workspace = true
defs.workspace = true
index.workspace = true
snafu.workspace = true
Expand Down
12 changes: 12 additions & 0 deletions crates/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "benchmark"
version.workspace = true
edition.workspace = true
license.workspace = true

[dependencies]
clap = { version = "4.5.54", features = ["derive"] }
defs.workspace = true
index.workspace = true
rayon = "1.11.0"
uuid = { version = "1.19.0", features = ["v4"] }
46 changes: 46 additions & 0 deletions crates/benchmark/Scripts/download_dataset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

set -e

if ! CARGO_TOML_PATH=$(cargo locate-project --message-format plain 2>/dev/null); then
echo "❌ Error: Could not find Cargo.toml. Are you running this inside a Rust project?" >&2
exit 1
fi

CRATE_ROOT=$(dirname "$CARGO_TOML_PATH")

ROOT_DIR="$CRATE_ROOT/Datasets"
BASE_URL="ftp://ftp.irisa.fr/local/texmex/corpus"

if [ -d "$ROOT_DIR" ]; then
echo "✅ '$ROOT_DIR' already exists. Skipping download."
exit 0
fi

echo "📂 Creating directory at: $ROOT_DIR"
mkdir -p "$ROOT_DIR"

DATASETS=("siftsmall.tar.gz" "sift.tar.gz")

for FILENAME in "${DATASETS[@]}"; do
URL="$BASE_URL/$FILENAME"
TEMP_FILE_PATH="$ROOT_DIR/$FILENAME"
EXPECTED_FOLDER="${FILENAME%%.tar.gz}"

echo "⬇️ Downloading $FILENAME using curl..."

if ! curl -# -L -o "$TEMP_FILE_PATH" "$URL"; then
echo "❌ Failed to download $URL" >&2
exit 1
fi

echo "📦 Extracting $FILENAME..."

tar -xzf "$TEMP_FILE_PATH" -C "$ROOT_DIR"

rm "$TEMP_FILE_PATH"

echo "✨ Extracted to $ROOT_DIR/$EXPECTED_FOLDER"
done

echo -e "\n🎉 Setup complete! Your file tree is ready."
Loading
Loading