bandwidth_test.pl



NAME

bandwidth_test.pl


DESCRIPTION

Hand made bandwidth tester.


COPYRIGHT

Copyright 2010 Etienne LEMEE <coding AT etilem DOT net>

This piece of code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


#!/usr/bin/perl -w

use strict;
use LWP::Simple;

my ($u, $e, $c);
$u = "http://etilem.net/TEST";
$e -= time;
$c = get $u or die $!;
$e += time;
printf "%0.2f Kb/s\n", length($c) / $e / 1024;