cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Progress Meter, Statistics

From: Georg Horn <horn_at_koblenz-net.de>
Date: Wed, 23 Feb 2000 18:09:23 +0100

On Wed, Feb 23, 2000 at 04:21:34PM +0100, Daniel Stenberg wrote:

> > 1: Don't display any statistics at all (not the -s switch, since -s
> > suppresses errors too...)
>
> 'curl -s -S' is probably what you're after!

Yes, i stumbled across the -S option after sending the mail...

> > 2: Just display a summary at the end of the download, as it happens now
> > when the total number of bytes is less than LEAST_SIZE_PROGRESS, but in
> > a _single_ line without the \r at the beginning:
> > 1174 bytes received in 0.024 seconds (49167 bytes/sec)
> > This will be used to determine just the overall transfer rate.
>
> Quite amazingly, this is exactly what the new -w option does (introduced
> in the upcoming 6.5). -w takes a string and has a bunch of variable
> substitutions to enable you to select what to see.

Hey, that's fine. Maybe i should look into 6.5.

> > 3: Display statitics data in a configurable intervall during the
> > download like this:
> > TIME RECEIVED % CURR-SPEED
> > 00:00:02 1100648 9 1098021
> > 00:00:04 3376564 10 1117624
> > ...
> > This will be used to determine how the transfer rate varies during a
> > transfer.
>
> I can see the point in having a feature like this.

Yes, if you just have an overall average of xxx Bytes / sec, this doesn't
say much about the quality of the connection, if it's stable or if
the transfer rate varies or even goes down to zero sometimes...
It's basically the same as the progress bar, but each line should not
overwrite the privious one, that is replace the \r by a \n. And the way how
the current speed is calculated should be configurable. For now curl
displays every second the average speed of the last 5 seconds. I would prefer
to display every n seconds the average speed of the last n seconds.

> > One could use the -s switch for this: -s behaves like it is now, and -sx
> > selects option number x from the above list.
>
> I don't see how this can be added to -s (-sx can't be used since that
> would be -s and -x written next to each other and -x is already used).
>
> I could however think of a -w -style option where you specify what kind of
> line you want to get written intead of the progress meter line with a
> steady interval. I would then suggest -W or possibly using the -w for the
> format and another flag to enable the interval-output.

I wanted to say: -s <number> where <number> can be 1, 2, or 3 (the three
options i listed above).

So what about the following:
-s 0
    Don't display any statistics or errors.
-s 1
    Only display errors.
-s 2
    Display errors and a single summary line at the end of the download.
-s 3[:x[:y]]
    Display errors and every x seconds the average speed of the last y
    seconds, plus a single summary line at the end of the download.
    If not specified, y defaults to x and x to 1.

The -S option would be obsolete then. Or you could just use -s1 for the summary
and -s2 for the interval-output and use -S to enable (or disable) errormessages
separately.

Bye,
Georg
Received on 2000-02-23