Bandwidth test, delay test using urllib2

I want to make a python script that checks for connection bandwidth. I am going to upload / download a file with a known size using urllib2 and measure the time it takes to complete this task. I would also like to measure the delay for a given IP address, for example through pinging IP. Is this possible with urllib2?

+4
source share
2 answers

You can use PyCurl for this. curl_easy_getinfo gives information about: CURLINFO_TOTAL_TIME, CURLINFO_NAMELOOKUP_TIME, CURLINFO_CONNECT_TIME, CURLINFO_PRETRANSFER_TIMEetc.

+3
source

. , , , .

0

All Articles