diff --git a/Cargo.lock b/Cargo.lock index beef456..d4998aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -736,7 +736,7 @@ dependencies = [ [[package]] name = "rush" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 3ea9dcc..e37f6c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rush" -version = "0.5.0" +version = "0.5.1" edition = "2021" authors = ["Ringo Hoffmann "] description = "A tiny HTTP benchmarking and performance testing CLI tool." diff --git a/src/main.rs b/src/main.rs index a206fc6..387091f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,7 @@ struct Args { /// Perform warmup requests which do not count to the benchmark result #[arg(short, long)] - warmup: Option, + warmup: Option, /// A duration awaited before a request is sent; you can pass /// a range (format: 'from..to', e.g. '10ms..20ms') from which @@ -113,7 +113,9 @@ fn main() -> Result<()> { .build()?; if let Some(warmup) = args.warmup { - perform_requests(&pool, &client, warmup.into(), wait.as_ref())?; + if warmup > 0 { + perform_requests(&pool, &client, warmup, wait.as_ref())?; + } } let mut res = perform_requests(&pool, &client, args.count.into(), wait.as_ref())?;