1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

progress: let "current speed" be UL + DL speeds combined

Bug #1556
Reported-by: Paul Harris
Closes #1559
This commit is contained in:
Daniel Stenberg 2017-06-09 11:16:18 +02:00
parent 31a67ac1f1
commit 1213baba27

View File

@ -380,11 +380,10 @@ int Curl_pgrsUpdate(struct connectdata *conn)
data->progress.lastshow = now.tv_sec; data->progress.lastshow = now.tv_sec;
/* Let's do the "current speed" thing, which should use the fastest /* Let's do the "current speed" thing, with the dl + ul speeds
of the dl/ul speeds. Store the faster speed at entry 'nowindex'. */ combined. Store the speed at entry 'nowindex'. */
data->progress.speeder[ nowindex ] = data->progress.speeder[ nowindex ] =
data->progress.downloaded>data->progress.uploaded? data->progress.downloaded + data->progress.uploaded;
data->progress.downloaded:data->progress.uploaded;
/* remember the exact time for this moment */ /* remember the exact time for this moment */
data->progress.speeder_time [ nowindex ] = now; data->progress.speeder_time [ nowindex ] = now;
@ -433,10 +432,9 @@ int Curl_pgrsUpdate(struct connectdata *conn)
} }
} }
else else
/* the first second we use the main average */ /* the first second we use the average */
data->progress.current_speed = data->progress.current_speed =
(data->progress.ulspeed>data->progress.dlspeed)? data->progress.ulspeed + data->progress.dlspeed;
data->progress.ulspeed:data->progress.dlspeed;
} /* Calculations end */ } /* Calculations end */