streex 0.1.12

Kafka store runner
Documentation
#[tokio::main]
async fn main() {
    let mut handles = vec![];
    for tenant in 0..100 {
        let h = tokio::spawn(async move {
            for n in 0..20 {
                let client = reqwest::Client::new();
                let tot = 2000;
                for i in 0..tot {
                    let k = protolib::Key {
                        version: 1,
                        tenant,
                        item: n,
                        hash: i,
                    };
                    let req = client
                        .get(format!("http://localhost:8080/stores/test/{k}"))
                        .build()
                        .expect("Could not build request");
                    if !client
                        .execute(req)
                        .await
                        .expect("Could not query store")
                        .status()
                        .is_success()
                    {
                        panic!("Key {k} not found");
                    }

                    println!("-- {k}");
                }
            }
        });
        handles.push(h);
    }
    for h in handles {
        h.await.unwrap();
    }
}