Skip to content

multi: fix odd total timer reset in file_do() while fetching file://#12682

Closed
sergio-nsk wants to merge 1 commit intocurl:masterfrom
snxd:sergio-nsk/timings/1
Closed

multi: fix odd total timer reset in file_do() while fetching file://#12682
sergio-nsk wants to merge 1 commit intocurl:masterfrom
snxd:sergio-nsk/timings/1

Conversation

@sergio-nsk
Copy link
Copy Markdown
Contributor

While working with timings with file:// urls, I've notices an issue: the total time interval is always less than the pre-transfer and the start transfer time intervals. The reason: Curl_prgsStartNow() is called twice: in MSTATE_INIT (properly) and in MSTATE_DO in file_do(), and TIMER_STARTSINGLE is set between those calls in MSTATE_CONNECT.

The total timer is properly reset in MSTATE_INIT.
MSTATE_CONNECT starts with resetting the timer that is a start point for
further multi states.
If file://, MSTATE_DO calls file_do() that should not reset the total timer.
Otherwise, the total time is always less than the pre-transfer and the start
transfer times.
@sergio-nsk sergio-nsk force-pushed the sergio-nsk/timings/1 branch from 41c03fc to 7478cc1 Compare January 11, 2024 03:46
@sergio-nsk sergio-nsk changed the title SPTCH-3413: fix odd total timer reset in file_do() multi: fix odd total timer reset in file_do() while fetching file:// Jan 11, 2024
@bagder bagder closed this in 98543fc Jan 11, 2024
@bagder
Copy link
Copy Markdown
Member

bagder commented Jan 11, 2024

Thanks!

@sergio-nsk sergio-nsk deleted the sergio-nsk/timings/1 branch January 11, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants