You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download a file using http -dc <address> -o ./somefile
Interrupt the download at a high percentage done (e.g. 95%)
Resume the download with the same command in Step 1
When it completes, observe the average speed printed
The code to compute average speed this divides total file size by the time spent in the current (resumed) invocation of httpie. so the output is a much higher average speed than actual.
Checklist
Minimal reproduction code and steps
http -dc <address> -o ./somefile
The code to compute average speed this divides total file size by the time spent in the current (resumed) invocation of httpie. so the output is a much higher average speed than actual.
We should keep track of how much of the file was downloaded in the current invocation and use that as the numerator over here: https://github.com/httpie/httpie/blob/30a6f73ec806393d897247b4c7268832de811ff7/httpie/output/ui/rich_progress.py#L41
Current result
When I download the last 10% of a file at 5MB/s, the printed average speed is 50MB/s (1/10 the file size => 10x the speed)
Expected result
When I download the last 10% of a file at 5MB/s, the printed average speed should be 5MB/s
Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Additional information, screenshots, or code examples
…
The text was updated successfully, but these errors were encountered: