1 |
commit: 1f26829eb69625e86babfdf301d1f1d3afbdaf36 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 4 19:05:34 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 4 19:05:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1f26829e |
7 |
|
8 |
qlop: slightly increase the average when computing ETA |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qlop.c | 3 +++ |
13 |
1 file changed, 3 insertions(+) |
14 |
|
15 |
diff --git a/qlop.c b/qlop.c |
16 |
index ad16d55..762523f 100644 |
17 |
--- a/qlop.c |
18 |
+++ b/qlop.c |
19 |
@@ -1002,6 +1002,9 @@ static int do_emerge_log( |
20 |
pkg = get_set(afmt, merge_averages); |
21 |
if (pkg != NULL) { |
22 |
maxtime = pkg->time / pkg->cnt; |
23 |
+ /* add 14% of the diff between avg and max, to avoid |
24 |
+ * frequently swapping to maxtime */ |
25 |
+ maxtime += (pkg->tbegin - maxtime) / 7; |
26 |
if (elapsed >= maxtime) { |
27 |
maxtime = pkg->tbegin; |
28 |
if (elapsed >= maxtime) |