From 5086480b287ec6f357b1dd25e092032df1687d6f Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Mon, 29 Sep 2025 20:18:10 +0400 Subject: [PATCH 1/3] small improvement of stress testing tool --- stress/main.rs | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/stress/main.rs b/stress/main.rs index 68e7ee0cf..42438854e 100644 --- a/stress/main.rs +++ b/stress/main.rs @@ -353,8 +353,15 @@ fn generate_plan(opts: &Opts) -> Result Result Result() { + plan.queries_per_thread.push(Vec::new()); + } else { + plan.queries_per_thread + .last_mut() + .unwrap() + .push(line.to_string()); } - plan.queries_per_thread.push(queries); } Ok(plan) } From f3a148b802279a39995c6462a6df6361a45bc3c7 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Tue, 30 Sep 2025 11:37:43 +0400 Subject: [PATCH 2/3] keep db file --- stress/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stress/main.rs b/stress/main.rs index 42438854e..9b806cb5b 100644 --- a/stress/main.rs +++ b/stress/main.rs @@ -472,12 +472,15 @@ async fn main() -> Result<(), Box> { let plan = Arc::new(plan); let tempfile = tempfile::NamedTempFile::new()?; + let (_, path) = tempfile.keep().unwrap(); let db_file = if let Some(db_file) = opts.db_file { db_file } else { - tempfile.path().to_string_lossy().to_string() + path.to_string_lossy().to_string() }; + println!("db_file={}", db_file); + let vfs_option = opts.vfs.clone(); for thread in 0..opts.nr_threads { From 9d7e28ac4311caac9e7937b76c787067ca623499 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Tue, 30 Sep 2025 11:39:17 +0400 Subject: [PATCH 3/3] fix clippy --- stress/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stress/main.rs b/stress/main.rs index 9b806cb5b..eca212977 100644 --- a/stress/main.rs +++ b/stress/main.rs @@ -419,8 +419,8 @@ fn read_plan_from_log_file(opts: &Opts) -> Result() { + for line in lines { + if line.parse::().is_ok() { plan.queries_per_thread.push(Vec::new()); } else { plan.queries_per_thread @@ -479,7 +479,7 @@ async fn main() -> Result<(), Box> { path.to_string_lossy().to_string() }; - println!("db_file={}", db_file); + println!("db_file={db_file}"); let vfs_option = opts.vfs.clone();