cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: usage of cURL and progress-bar

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 30 Sep 2002 19:55:32 +0200 (MET DST)

On Mon, 30 Sep 2002, VLERICK ROLAND wrote:

> curl --progress-bar "http://10.1.224.50/NASApp/adressen/Adressen.jsp" ====>
> Does not show any progress bar
>
> Do I miss some additional options maybe ??

Yes, the curl tool switches off progress bars when the output is sent to
stdout, as otherwise it would mix with and ruin the file download. If you use
-o or -O to direct the download to a file, you'll see the progress bar
properly.

> time curl --progress-bar --write "Downloaded %{size_download} bytes in
> %{time_connect} seconds (%{speed_download} bytes/s)"
> http://10.1.224.50/NASApp/adressen/Adressen.jsp
>
> Gives an output
>
> Downloaded 25439 bytes in 0.001 seconds
> (7115.804 bytes/s)
> real 0m3.578s
> user 0m0.010s
> sys 0m0.000s
>
> The time mentionned by cURL is very different from the one showed by the
> time command , how is this explained please ?

A quote from the manual:

          time_connect The time, in seconds, it took from the
                         start until the connect to the remote
                         host (or proxy) was completed.

This truly means the connect ONLY. That is the time from you invoke the
command until it has connected to the remote host. As you specified IP number
only, no time was wasted on a DNS resolve and thus, only the TCP connect
phase was needed and that took 0.001 seconds (give or take your system's
inaccuracy).

If you use 'time_total' I bet you'll get a result that is closer to the one
you get with time.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-09-30