git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] make sure throughput display gets updated even if progress doesn't move

From
Nicolas Pitre <nico@cam.org>
Date
Nov 1, 2007, 20:59 UTC
Message-ID
<1193950797-29631-3-git-send-email-nico@cam.org>
In-Reply-To
<1193950797-29631-2-git-send-email-nico@cam.org>

Currently the progress/throughput display update happens only through display_progress(). If the progress based on object count remains unchanged because a large object is being received, the latest throughput won't be displayed. The display update should occur through display_throughput() as well.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 progress.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/progress.c b/progress.c
index 34a5961..39d5d2c 100644
--- a/progress.c
+++ b/progress.c
@@ -160,6 +160,9 @@ void display_throughput(struct progress *progress, unsigned long n)
 		tp->last_misecs[tp->idx] = misecs;
 		tp->idx = (tp->idx + 1) % TP_IDX_MAX;
 		tp->count = 0;
+
+		if (progress->last_value != -1 && progress_update)
+			display(progress, progress->last_value, 0);
 	}
 }
 
-- 
1.5.3.4.279.gb2d9d-dirty
Previous: Nicolas PitreNext: Nicolas Pitre
Message 3 of 5 in “yet more progress display stuff”
  1. 0/3 yet more progress display stuffNicolas Pitre, Nov 1, 2007
  2. 1/3 return the prune-packed progress display to the inner loopNicolas Pitre, Nov 1, 2007
  3. 2/3 make sure throughput display gets updated even if progress doesn't moveNicolas Pitre, Nov 1, 2007
  4. 3/3 Show total transferred as part of throughput progressNicolas Pitre, Nov 1, 2007
  5. Shawn O. PearceNov 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.