From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:48631) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j73tX-0007Yt-UU for guix-patches@gnu.org; Wed, 26 Feb 2020 16:07:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j73tX-0004oB-2p for guix-patches@gnu.org; Wed, 26 Feb 2020 16:07:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j73tW-0004np-DQ for guix-patches@gnu.org; Wed, 26 Feb 2020 16:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j73tW-0000Pq-87 for guix-patches@gnu.org; Wed, 26 Feb 2020 16:07:02 -0500 Subject: bug#39734: [PATCH] scripts: Emit GC hint if free space is lower than absolute and relative threshold. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87wo8ccmd3.fsf@ambrevar.xyz> <20200224132024.5790-1-mail@ambrevar.xyz> <87v9nvelqx.fsf@gnu.org> <87lforarw6.fsf@ambrevar.xyz> Date: Wed, 26 Feb 2020 22:06:47 +0100 In-Reply-To: <87lforarw6.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Tue, 25 Feb 2020 11:22:01 +0100") Message-ID: <87pne1awig.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt Cc: 39734-done@debbugs.gnu.org Hello, Pierre Neidhardt skribis: > Ludovic Court=C3=A8s writes: > >>> + (let* ((default-absolute-threshold (size->number "5GiB")) >>> + (default-relative-threshold 0.05) >>> + (percentage->float (lambda (percentage) >>> + (or (and=3D> (string->number >>> + (car (string-split percentag= e #\%))) >> >> Mayes just: (string-drop-right percentage 1). > > This does not work if the value does not have a percent sign, e.g. it > turns "13" into "1". > > Resubmitting the patch with the other change. > Feel free to merge! ;) Perfect, I pushed it on your behalf. Thank you for your patience! Ludo=E2=80=99.