• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Measure connection speed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ahmad Ras
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
A timing clock, fuse wire, high explosives and a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic