Download/Upload speed is not accurate. #2200

Closed
julian0427 opened this Issue Dec 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant

I did this

double download_speed = 0;
double timeval = 0;
double downloadSize = 0;
curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &downloadSize);
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &timeval);
curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &download_speed);
printf("size: %f, time: %f, download speed: %f\n", downloadSize, timeval, download_speed);

When the elapsed time is much less than 1 seconds, the average download speed above is much less than actual. e.g.,
size: 14613.000000, time: 0.187000, download speed: 14613.000000

I expected the following

size: 14613.000000, time: 0.187000, download speed: 78144.385026

curl/libcurl version

7.56.1, 7.57.0
[curl -V output]

operating system

Windows7, Android

julian0427 pushed a commit to julian0427/curl that referenced this issue Dec 29, 2017

@julian0427 julian0427 closed this Dec 29, 2017

@julian0427 julian0427 reopened this Dec 29, 2017

julian0427 pushed a commit to julian0427/curl that referenced this issue Dec 29, 2017

bagder added a commit that referenced this issue Jan 1, 2018

progress: calculate transfer speed on milliseconds if possible
to increase accuracy for quick transfers

Bug #2200

@julian0427 julian0427 closed this Jan 1, 2018

bagder added a commit that referenced this issue Jan 4, 2018

progress: calculate transfer speed on milliseconds if possible
to increase accuracy for quick transfers

Fixes #2200

bagder added a commit that referenced this issue Jan 8, 2018

progress: calculate transfer speed on milliseconds if possible
to increase accuracy for quick transfers

Fixes #2200
Closes #2206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment