Skip to content

Commit 6f56d12

Browse files
committed
feat: add another benchmark using the server
1 parent e3ca965 commit 6f56d12

File tree

4 files changed

+345
-3
lines changed

4 files changed

+345
-3
lines changed

Cargo.lock

Lines changed: 94 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ uuid = { version = "1.8.0", features = ["v7", "serde"] }
1212
chrono = { version = "0.4.43", features = ["serde"] }
1313
jsonb_schema = { git = "https://github.com/dataunitylab/jsonb", branch = "jsonb-schema" }
1414
mongodb = { version = "3.5.0", optional = true }
15+
tokio-postgres = "0.7.10"
1516
tokio = { version = "1.49.0", features = ["full"] }
1617
async-trait = "0.1.89"
1718
futures = "0.3.31"

src/bin/argusdb.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ struct Args {
3737
#[arg(short, long)]
3838
port: Option<u16>,
3939

40+
/// Memtable threshold
41+
#[arg(long)]
42+
memtable_threshold: Option<usize>,
43+
44+
/// JSTable threshold
45+
#[arg(long)]
46+
jstable_threshold: Option<u64>,
47+
48+
/// JSTable directory
49+
#[arg(long)]
50+
jstable_dir: Option<String>,
51+
52+
/// Index threshold
53+
#[arg(long)]
54+
index_threshold: Option<u64>,
55+
4056
/// Print help
4157
#[arg(long, action = clap::ArgAction::Help)]
4258
help: Option<bool>,
@@ -242,6 +258,24 @@ async fn main() {
242258
if let Some(port) = args.port {
243259
builder = builder.set_override("port", port).unwrap();
244260
}
261+
if let Some(memtable_threshold) = args.memtable_threshold {
262+
builder = builder
263+
.set_override("memtable_threshold", memtable_threshold as i64)
264+
.unwrap();
265+
}
266+
if let Some(jstable_threshold) = args.jstable_threshold {
267+
builder = builder
268+
.set_override("jstable_threshold", jstable_threshold as i64)
269+
.unwrap();
270+
}
271+
if let Some(jstable_dir) = args.jstable_dir {
272+
builder = builder.set_override("jstable_dir", jstable_dir).unwrap();
273+
}
274+
if let Some(index_threshold) = args.index_threshold {
275+
builder = builder
276+
.set_override("index_threshold", index_threshold as i64)
277+
.unwrap();
278+
}
245279

246280
let subscriber = tracing_subscriber::fmt()
247281
.with_max_level(Level::TRACE)

0 commit comments

Comments
 (0)