pub async fn penetrate(num_of_requests: usize, url: String) {
    let requests = (0..num_of_requests)
        .map(|_| do_request(&url[..]));

    println!("Sending requests...");
    let start = Instant::now();
    let request_results = join_all(requests).await;
    let duration = start.elapsed();

    generate_result(request_results, duration.as_millis(), url);
}
/// Penetrates the url with the amount of requests provided by the user.
Penetrates the url with the amount of requests provided by the user.
Penetrates the url with the amount of requests provided by the user .
pub async fn penetrate(num_of_requests: usize, url: String) {
    let requests = (0..num_of_requests)
        .map(|_| do_request(&url[..]));
    println!("Sending requests...");
    let start = Instant::now();
    let request_results = join_all(requests).await;
    let duration = start.elapsed();
    generate_result(request_results, duration.as_millis(), url);
}
pub async fn penetrate ( num_of_requests : usize , url : String ) { let requests = ( 0 .. num_of_requests ) . map ( | _ | do_request ( & url [ .. ] ) ) ; println ! ( " " ) ; let start = Instant :: now ( ) ; let request_results = join_all ( requests ) . await ; let duration = start . elapsed ( ) ; generate_result ( request_results , duration . as_millis ( ) , url ) ; }
Penetrates the url with the amount of requests provided by the user.
Penetrates the url with the amount of requests provided by the user .
num_of_requests
usize
url
String
num_of_requests
usize
url
String