From d09533b678a2e608430d9a3d08fdaf5e069c0ba6 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 12 Jun 2025 13:39:02 -0400 Subject: [PATCH] Add `time_test` as a simple way of measuring impact of parallelization efforts. --- Cargo.lock | 10 ++++++++++ Cargo.toml | 1 + src/lib.rs | 1 + 3 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index bfbe4fe..5a07e77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1680,6 +1680,7 @@ dependencies = [ "derive_more", "mysql_async", "testcontainers-modules", + "time-test", "tokio", ] @@ -1803,6 +1804,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "time-test" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff3804c6adc3d7a9f51586d6a47f7e57e173b9a2d257679deeb6d686d2698073" +dependencies = [ + "time", +] + [[package]] name = "tinystr" version = "0.8.1" diff --git a/Cargo.toml b/Cargo.toml index 09ee5d0..c2e1a43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,5 @@ edition = "2024" derive_more = { version = "2", features = ["deref", "deref_mut"] } mysql_async = "0.36" testcontainers-modules = { version = "0.12", features = ["mysql"] } +time-test = "0.3" tokio = { version = "1", features = ["macros", "rt-multi-thread"] } diff --git a/src/lib.rs b/src/lib.rs index 6622f0f..eaf3aba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,6 +49,7 @@ mod test { #[tokio::test] async fn test_mysql() -> Result<(), Box> { let mut conn = get_test_connection().await?; + time_test::time_test!(); crate::load_data(&mut conn).await?; Ok(()) }