thundra 1.0.0

A fast HTTP benchmarking tool built in Rust
Documentation
use std::time::Duration;
use thundra::{Benchmark, Result};

#[tokio::main]
async fn main() -> Result<()> {
    // Run a simple benchmark
    let results = Benchmark::builder()
        .url("http://localhost:3000")
        .concurrency(50)
        .duration(Duration::from_secs(10))
        .show_progress(true)
        .build()?
        .run()
        .await?;

    // Print results using the built-in formatter
    results.print();

    // Or access individual metrics programmatically
    println!("\n--- Programmatic Access ---");
    println!("Total requests: {}", results.total_requests);
    println!(
        "Success rate: {:.2}%",
        (results.successful_requests as f64 / results.total_requests as f64) * 100.0
    );
    println!("Throughput: {:.2} req/s", results.throughput);
    println!("p99 latency: {:?}", results.latency_p99);

    Ok(())
}