Hi everyone. I need some help regarding the code below. I would like to save the latency results into a file whenever a measurement is carried out. Furthermore I would to add a progress bar when the measurements being done. Thank your for your continued support.
#!/usr//bin/perl -w use LWP::UserAgent; use Time::HiRes 'time','sleep'; $ua = LWP::UserAgent->new; $request = new HTTP::Request('GET', "http://http://www.computerhope.co +m/file.com"); $start = time( ); $response = $ua->request($request); $end = time( ); $latency = $end - $start; print length($response->as_string( )), " bytes received in $latency s +econds\n";
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |