The throughput display needs a delay period before accounting and
displaying anything. Yet it might be called after some amount of data
has already been transferred. The display of total data is therefore
accounted late and therefore smaller than the reality.
Let's call display_throughput() with an absolute amount of transferred
data instead of a relative number, and let the throughput code find the
relative amount of data by itself as needed. This way the displayed
total is always exact.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nicolas Pitre18 years agocommitted byJunio C Hamano
@ -110,7 +109,7 @@ static int display(struct progress *progress, unsigned n, int done)
@@ -110,7 +109,7 @@ static int display(struct progress *progress, unsigned n, int done)
return 0;
}
void display_throughput(struct progress *progress, unsigned long n)