aboutsummaryrefslogtreecommitdiff
path: root/qlop.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-10-04 21:05:34 +0200
committerFabian Groffen <grobian@gentoo.org>2020-10-04 21:05:34 +0200
commit1f26829eb69625e86babfdf301d1f1d3afbdaf36 (patch)
treed34642d962d94f8d0a4144ea9a1f7d32271838cc /qlop.c
parentqlop: drop accidential debug print from probe_proc (diff)
downloadportage-utils-1f26829eb69625e86babfdf301d1f1d3afbdaf36.tar.gz
portage-utils-1f26829eb69625e86babfdf301d1f1d3afbdaf36.tar.bz2
portage-utils-1f26829eb69625e86babfdf301d1f1d3afbdaf36.zip
qlop: slightly increase the average when computing ETA
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qlop.c')
-rw-r--r--qlop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qlop.c b/qlop.c
index ad16d553..762523fc 100644
--- a/qlop.c
+++ b/qlop.c
@@ -1002,6 +1002,9 @@ static int do_emerge_log(
pkg = get_set(afmt, merge_averages);
if (pkg != NULL) {
maxtime = pkg->time / pkg->cnt;
+ /* add 14% of the diff between avg and max, to avoid
+ * frequently swapping to maxtime */
+ maxtime += (pkg->tbegin - maxtime) / 7;
if (elapsed >= maxtime) {
maxtime = pkg->tbegin;
if (elapsed >= maxtime)