| Author |
Measure connection speed
|
Ahmad Ras
Greenhorn
Joined: Jun 09, 2010
Posts: 11
|
|
Hello,
How can you measure my internet connection speed in Java? I am thinking about calling the DOS command ping to yahoo website for example and see how log the packets take. Is there another way programmatically or by calling external process/api?
Thank you very much
PS: My app is to run on windows clients
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Ping is unrelated to connection speed. Most speed measurements are done by dowloading a large (10MB or more) file, download that, and then calculate the speed based on how large the file is and how long it took to download. Similarly you can calculate the upload speed by uploading a file.
Of course the source / destination of the file matters a lot. If that's a slow server you think your speed is slow but in fact it may not be. Several ISPs have servers you can use for this, with files available you can download for just these purposes.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Ahmad Ras
Greenhorn
Joined: Jun 09, 2010
Posts: 11
|
|
Oh Great. Thanks I didnt know tht ping would be irrilevent. can you tell me why? I thought it measures how long the packet will take to make to a server. Wouldnt be a good method to compare (lets say 5 different connections) since it is going the same target.
If I am look for ISP service like that ( where ican dowload/upload) what key word should Iuse to search for that? I have no clue where to start
thanks man
|
 |
 |
|
|
subject: Measure connection speed
|
|
|