From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D3DD8138359 for ; Sun, 4 Oct 2020 19:06:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14190E081B; Sun, 4 Oct 2020 19:06:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EAE88E081B for ; Sun, 4 Oct 2020 19:06:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3011335D28 for ; Sun, 4 Oct 2020 19:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2A0F1373 for ; Sun, 4 Oct 2020 19:06:10 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1601838334.1f26829eb69625e86babfdf301d1f1d3afbdaf36.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qlop.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 1f26829eb69625e86babfdf301d1f1d3afbdaf36 X-VCS-Branch: master Date: Sun, 4 Oct 2020 19:06:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8514a418-dde1-4ad5-8711-181fe402a135 X-Archives-Hash: f61f69c5f1463f4d0fb6fc33d12b9545 commit: 1f26829eb69625e86babfdf301d1f1d3afbdaf36 Author: Fabian Groffen gentoo org> AuthorDate: Sun Oct 4 19:05:34 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Oct 4 19:05:34 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1f26829e qlop: slightly increase the average when computing ETA Signed-off-by: Fabian Groffen gentoo.org> qlop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qlop.c b/qlop.c index ad16d55..762523f 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)