curl-users
Re: Progress Meter, Statistics
Date: Thu, 24 Feb 2000 11:35:20 +0100
Georg Horn wrote:
> > > 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
> > > ...
[snip]
> 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.
With my suggestion, using a custom string to define the interval info, you
could very well make it an alternative progress meter if you wanted. Then
you would in charge of using \n or \r, or even just an ' ' if that is what
you want.
To get the output you described above, it could perhaps be made with:
curl -W '%{total_time} %{size_download} %{percent_downloaded}\n'
www.url.com
> And the way how
> the current speed is calculated should be configurable.
... you would then probably have to calculate the speed of the moments by
yourself when you postprocess the output. If you get the output at a
somewhat steady interval, that would be a very small effort.
The reason why I would like that line fully customized, is of course that
you have one purpose you seek to use this for right now, but another
person will have a slightly different one tomorrow and by doing this
right, we might fulfill both needs.
> 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.
I just think that would be a little too much fiddle with very specialized
information, that hardly anyone but you would ever use.
[ -s vs -S ]
I don't intend to change -s nor -S as of this moment.
-- Daniel Stenberg - http://www.contactor.se/~dast - +46-705-44 31 77 ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`olReceived on 2000-02-24