Does anybody know a module to test the speed of internet-connection?
Speed as in bandwidth? Or as in latency? For the latter, just use Net::Ping.
For bandwidth, I don't know if there's anything ready made, there's 2 approaches:
You can try to leverage ibmonitor
Otherwise, to measure download bandwidth find a web site that lets you measure bandwidth by downloading a large file (or find such a large file on high-performance site); start the timer, start downloading that file (e.g. using LWP or any other module you wish - or Net::FTP if your file is on FTP site) - measure how long it takes and divide by the file size.
Similar logic for measuring upload bandwidth, but instead of finding large file, you need to find a place on the internet (like a public repository) that'd allow uploading one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With