Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
progress: Track total times following redirects #1602
Update the progress timers
As a related change, rename
Added test case 1399.
Fixes #522 and Known Bug 1.8
Thanks for the review @bagder!
I've added the
A couple other items to flag in case they are issues:
I'll drop another note in this conversation once the new builds finish to confirm the
I noticed something interesting when looking into the issue of starttransfer being greater than total, and I could use some input on what the correct behavior is and/or how to further debug.
What I've found is that sometimes
Previously, capturing the time of
Even more interesting is that I can apply the same debug/logging code to
Conceptually, I wouldn't think it would be correct for
I agree that setting
I think the reason for the double setting is simply because the state in which it sets it doesn't change when set so it can detect a believed start situation again!
Makes sense to resolve before merging this PR. I'm happy to take a stab at it, though not being very familiar with the code I could use some guidance on what you think the best approach might be.
Do you think it's as simple as checking within
Or is the double invocation a symptom of a larger problem that needs to be solved? e.g., perhaps there's a bug in
Let me know your thoughts and I'll start working on this in a new issue/PR. Thanks!
Prevent `Curl_pgrsTime` from modifying `t_starttransfer` when invoked with `TIMER_STARTTRANSFER` more than once during a single request. When a redirect occurs, this is considered a new request and `t_starttransfer` can be updated to reflect the `t_starttransfer` time of the redirect request. Closes #1616 Bug: #1602 (comment)
Update the progress timers `t_nslookup`, `t_connect`, `t_appconnect`, `t_pretransfer`, and `t_starttransfer` to track the total times for these activities when a redirect is followed. Previously, only the times for the most recent request would be tracked. Related changes: - Rename `Curl_pgrsResetTimesSizes` to `Curl_pgrsResetTransferSizes` now that the function only resets transfer sizes and no longer modifies any of the progress timers. - Add a bool to the `Progress` struct that is used to prevent double-counting `t_starttransfer` times. Added test case 1399. Fixes #522 and Known Bug 1.8 Reported-by: joshhe
rylwin left a comment •
I've updated this PR now that
The logic for handling multiple invocations of
Looking forward to your comments!