Re: Question on CURLINFO_SPEED_DOWN/UPLOAD when paused/resumed

2021-08-12 Thread Joshua Harlow via curl-library
Great, thanks for verifying,

Much appreciated,

-Josh

On Thu, Aug 12, 2021 at 6:11 AM Daniel Stenberg  wrote:

> On Fri, 6 Aug 2021, Joshua Harlow via curl-library wrote:
>
> > When pausing and resuming I was noticing that CURLINFO_SPEED_UPLOAD and
> > CURLINFO_SPEED_DOWNLOAD and its counters/timers don't seem to reset
> (which
> > may just be how it is) and from looking at the progress.c code I think
> this
> > is what is happening. So if a long pause happens, then the speed
> > counters/timers may not actually take into account the fact that the
> > transfer was paused for quite some time which then would produce a not
> > exactly valid upload or download speed.
> >
> > Is this the expected behavior when pause/resume is used?
>
> Yes, it is expected. There's no logic that deducts the paused time, so you
> get
> the transfer size divided by the total time used, including all the paused
> time.
>
> --
>
>   / daniel.haxx.se
>   | Commercial curl support up to 24x7 is available!
>   | Private help, bug fixes, support, ports, new features
>   | https://curl.se/support.html
>
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Re: Question on CURLINFO_SPEED_DOWN/UPLOAD when paused/resumed

2021-08-12 Thread Daniel Stenberg via curl-library

On Fri, 6 Aug 2021, Joshua Harlow via curl-library wrote:


When pausing and resuming I was noticing that CURLINFO_SPEED_UPLOAD and
CURLINFO_SPEED_DOWNLOAD and its counters/timers don't seem to reset (which
may just be how it is) and from looking at the progress.c code I think this
is what is happening. So if a long pause happens, then the speed
counters/timers may not actually take into account the fact that the
transfer was paused for quite some time which then would produce a not
exactly valid upload or download speed.

Is this the expected behavior when pause/resume is used?


Yes, it is expected. There's no logic that deducts the paused time, so you get 
the transfer size divided by the total time used, including all the paused 
time.


--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Question on CURLINFO_SPEED_DOWN/UPLOAD when paused/resumed

2021-08-07 Thread Joshua Harlow via curl-library
Hi all,

I just wanted to see if I could clarify something (that I think is correct
but just thought I'd ask),

I'm using curl multi transfers and pausing and unpausing single curl
transfers as needed.

I am also looking at CURLINFO_SPEED_UPLOAD and CURLINFO_SPEED_DOWNLOAD when
the single transfers are done; and I am pretty sure that this is the case
but just wanted to double check:

When pausing and resuming I was noticing that CURLINFO_SPEED_UPLOAD and
CURLINFO_SPEED_DOWNLOAD and its counters/timers don't seem to reset (which
may just be how it is) and from looking at the progress.c code I think this
is what is happening. So if a long pause happens, then the speed
counters/timers may not actually take into account the fact that the
transfer was paused for quite some time which then would produce a not
exactly valid upload or download speed.

Is this the expected behavior when pause/resume is used?

Much appreciated,

-josh
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html