Calculating upload speed
Posted on 2004-08-24
I'm trying to calculate my upload speed so I can do an auto configure on my app. This is how I do it but it does not seem to give me anywhere near my actual upload speed (I checked on DSLREPORTS.com)
1. create a buffer of 500,000 bytes
2. Start timer .. start = ::GetTickcout() and send data to server
3. wait for response from server telling me it's got all the data
4. end timer end = ::GetTickcout() and deduct any overhead from the server to process to data.
5. calculate like so ... (500,000 / (end - start) ) / 1024 = XXKB upload
my upload is usual around 200k+ but using this method gives me a result of 20k .. Any ideas ???