diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 26d41796b..1399725d2 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -26,6 +26,8 @@ jobs: - name: Build run: ${{ matrix.settings.build }} shell: bash + - name: Build rust benchmarks + run: cargo build -p benchmark - name: Install benchmarks dependencies run: | cd benchmark diff --git a/Cargo.toml b/Cargo.toml index 0565b19c1..0d62a7969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,9 @@ openssl = "0.10.70" [lints.rust] unsafe-op-in-unsafe-fn = "warn" +[workspace] +members = ["benchmark"] + [build-dependencies] napi-build = "2.1.5" @@ -32,22 +35,3 @@ strip = "symbols" [profile.dev] panic = "abort" -[[bin]] -name = "select_benchmark" -path = "benchmark/logic_rust/select.rs" - -[[bin]] -name = "insert_benchmark" -path = "benchmark/logic_rust/insert.rs" - -[[bin]] -name = "concurrent_insert_benchmark" -path = "benchmark/logic_rust/concurrent_insert.rs" - -[[bin]] -name = "concurrent_select_benchmark" -path = "benchmark/logic_rust/concurrent_select.rs" - -[[bin]] -name = "batch_benchmark" -path = "benchmark/logic_rust/batch.rs" diff --git a/benchmark/Cargo.toml b/benchmark/Cargo.toml new file mode 100644 index 000000000..b3b133e6f --- /dev/null +++ b/benchmark/Cargo.toml @@ -0,0 +1,30 @@ +[package] +edition = "2024" +name = "benchmark" +version = "0.0.0" + +[dependencies] +scylla = { version = "1.4.0", features = [] } +tokio = { version = "1.34", features = ["full"] } +uuid = "1" +futures = "0.3" + +[[bin]] +name = "select_benchmark" +path = "logic_rust/select.rs" + +[[bin]] +name = "insert_benchmark" +path = "logic_rust/insert.rs" + +[[bin]] +name = "concurrent_insert_benchmark" +path = "logic_rust/concurrent_insert.rs" + +[[bin]] +name = "concurrent_select_benchmark" +path = "logic_rust/concurrent_select.rs" + +[[bin]] +name = "batch_benchmark" +path = "logic_rust/batch.rs"