cURL / Mailing Lists / curl-users / Single Mail

curl-users

[patch] Progress bar time estimate flaw

From: Stenberg Björn <Bjorn.Stenberg_at_elema.siemens.se>
Date: Mon, 22 Jan 2001 17:02:40 +0100

When downloading a file, the progress bar "progresses" like this:

 % Total % Received % Xferd Average Speed Time
Curr.
                                 Dload Upload Total Current Left
Speed
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:--
0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:--
0
  0 727k 0 0 0 0 1 0 206:55:39 0:00:04 206:55:35
0
 15 727k 15 116k 0 0 22739 0 0:00:32 0:00:05 0:00:27
29767
 36 727k 36 263k 0 0 43145 0 0:00:17 0:00:06 0:00:11
67361
100 727k 100 727k 0 0 81233 0 0:00:09 0:00:09 0:00:00
152k

(I've pressed return at strategic moments to make the output visible.)

Notice the third line. Average dload speed has been set to 1 byte/sec even
though no bytes are actually downloaded, which means the estimated time
explodes and does not fit in its allocated space, thus leaving a "0" at the
end of the line for the remainder of the download.

I've patched this so the '=1' assignment doesn't occur. I couldn't see why
it's done in the first place. (Daniel, please enlighten me! :) Anyway, now
it looks nicer:

  % Total % Received % Xferd Average Speed Time
Curr.
                                 Dload Upload Total Current Left
Speed
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:--
0
  0 727k 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:--
0
  0 727k 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:--
0
  0 727k 0 2920 0 0 363 0 0:34:08 0:00:08 0:34:00
730
 20 727k 20 146k 0 0 15467 0 0:00:48 0:00:09 0:00:39
37594
 41 727k 41 301k 0 0 22521 0 0:00:33 0:00:13 0:00:20
39703
 75 727k 75 550k 0 0 36003 0 0:00:20 0:00:15 0:00:05
97848
100 727k 100 727k 0 0 43821 0 0:00:16 0:00:16 0:00:00
106k

/Björn

Received on 2001-01-22