cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems with Bytes/Sec?

From: Jesse Noller <jnoller_at_archivas.com>
Date: Thu, 20 May 2004 15:49:48 -0400

On Thu, 2004-05-20 at 08:42, Jesse Noller wrote:
> Recently, we upgraded to 7.11.2 internally, we're using libcurl with
> PyCurl. We noticed, after upgrading that libcurl was spitting out when
> requesting SPEED_UPLOAD or SPEED_DOWNLOAD a bytes/sec value equal to the
> actual size of the file. We then tested this with the command line
> version of Curl:
>
> curl -T /home/FileData/file-3 http://penguin-010:8080/put/file-3 -w
> "Results:\n%{time_total}\n%{size_upload}\n%{speed_upload}\n"
>
> Results:
> 0.587
> 1048576
> 1048576.000
>
> The file itself is 1MB. The question is this: Why would Curl report back
> an average bytes/sec value equal to the size of the file? If it took
> half a second, the bytes/sec value should obviously be greater than the
> size of the file.
>
> Just wondering if I'm missing something. Thanks guys.
>
> -Jesse
>
>

This was for HTTP responses/values. I just tested this with the file:/
protocol. Doing the following:

mount foo:/bar /mnt/foo

curl -T /home/data/file-1 file:/path/to/copy/too -w
"Results:\n%{time_total}\n%{size_upload}\n%{speed_upload}\n"

Results in:

Results:
0.000
0
0.000
Received on 2004-05-20