From 913cef85e243e7cce77761dc679f07d6666af3f8 Mon Sep 17 00:00:00 2001 From: Sayan Nandan Date: Sun, 13 Sep 2020 20:13:00 +0530 Subject: [PATCH] Move `tdb-bench` into a separate crate Since tdb-bench no longer needs to be with cli, it was moved --- Cargo.lock | 19 +++++++++++++------ Cargo.toml | 3 ++- cli/Cargo.toml | 6 ------ tdb-bench/Cargo.toml | 12 ++++++++++++ .../bin/benchmark.rs => tdb-bench/src/main.rs | 2 +- 5 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 tdb-bench/Cargo.toml rename cli/src/bin/benchmark.rs => tdb-bench/src/main.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index 2da7b6cd..e5d8368c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,9 +155,9 @@ checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" [[package]] name = "getrandom" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" dependencies = [ "cfg-if", "libc", @@ -392,9 +392,9 @@ checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" [[package]] name = "proc-macro2" @@ -581,6 +581,15 @@ dependencies = [ "toml", ] +[[package]] +name = "tdb-bench" +version = "0.1.0" +dependencies = [ + "devtimer", + "libtdb", + "rand", +] + [[package]] name = "termcolor" version = "1.1.0" @@ -657,10 +666,8 @@ name = "tsh" version = "0.4.1" dependencies = [ "bytes", - "devtimer", "lazy_static", "libtdb", - "rand", "regex", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index f86df847..007b163b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,8 @@ members = [ "cli", "server", - "libtdb" + "libtdb", + "tdb-bench" ] [profile.release] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 59e4b074..54157169 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -9,12 +9,6 @@ edition = "2018" [dependencies] libtdb = {path = "../libtdb"} tokio = {version = "0.2.22", features = ["full"]} -rand = "0.7.3" -devtimer = "4.0.0" bytes = "0.5.6" regex = "1.3.9" lazy_static = "1.4.0" - -[[bin]] -path="src/bin/benchmark.rs" -name = "tdb-bench" \ No newline at end of file diff --git a/tdb-bench/Cargo.toml b/tdb-bench/Cargo.toml new file mode 100644 index 00000000..44e5e0db --- /dev/null +++ b/tdb-bench/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "tdb-bench" +version = "0.1.0" +authors = ["Sayan Nandan "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +rand = "0.7.3" +devtimer = "4.0.0" +libtdb = {path="../libtdb"} \ No newline at end of file diff --git a/cli/src/bin/benchmark.rs b/tdb-bench/src/main.rs similarity index 99% rename from cli/src/bin/benchmark.rs rename to tdb-bench/src/main.rs index de514043..6e86e560 100644 --- a/cli/src/bin/benchmark.rs +++ b/tdb-bench/src/main.rs @@ -1,5 +1,5 @@ /* - * Created on Sun Aug 02 2020 + * Created on Sun Sep 13 2020 * * This file is a part of TerrabaseDB * Copyright (c) 2020, Sayan Nandan