有 Perl 模块来测试互联网连接速度吗?
有人知道测试互联网连接速度的模块吗?
Does anybody know a module to test the speed of internet-connection?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有人知道测试互联网连接速度的模块吗?
Does anybody know a module to test the speed of internet-connection?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
速度与带宽一样吗?或者像延迟一样?对于后者,只需使用 Net::Ping。
对于带宽,不知道有没有现成的,有两种方法:
你可以尝试利用ibmonitor
否则,要测量下载带宽,请找到一个以下网站:让您可以通过下载大文件(或在高性能站点上找到如此大的文件)来测量带宽;启动计时器,开始下载该文件(例如使用 LWP 或您希望的任何其他模块- 或 Net::FTP(如果您的文件位于 FTP 站点上) - 测量需要多长时间并除以文件大小。
测量上传带宽的逻辑类似,但您需要在互联网上找到一个允许上传文件的位置(例如公共存储库),而不是查找大文件。
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.